X-pack :-Report : PDF generated report in the mail attached is getting corrupted

In 5.4.x, there's a couple ways to get logs.

You can see all of the debugging logs by adding logging.verbose: true to your kibana.yml file. This will show you a ton of information, certainly more than you care about, which will probably make it hard to pick out the information you care about.

You can also specify exactly what kind of logs you want to see in the output. It seems to be undocumented, but it's pretty simple. In this case, you want to see reporting and phantomConsole logs. You can add the following to your kibana.yml file, which should give you this output:

logging.events.logs: ['reporting', 'phantomConsole']

Note that this will stop all of the normal output, including info, warnings, and errors. If you'd like to continue to see that as well, use this:

logging.events.logs: ['info', 'warning', 'error', 'fatal', 'reporting', 'phantomConsole']

Once you've got that set up, restart Kibana to load the new config and manually generate a report, using the UI in visualize or dashboard. Whatever you manually did before is fine. Now if you check the output from the Kibana server, you'll see some reporting and phantom output, including the URLs being requested, any failures in the response, or failures loading the page, etc. This should help determine what is causing the report to error out. If you can't make sense of it, post the output here and I should be able to offer up a solution.