Cannot export to PDF

On one of our client production systems, we cannot export any PDF grids. If we “view” the export it says the file doesn’t exist in the tmp folder. If we “download” then Adobe says it cannot open the file “because it is either not a supported file type or because rhe file has been damaged”.

We’ve tried redeploying the common files and libraries, but still the same. We can export to Excel, Word etc with no problems. It’s just the PDFs.

Anybody have any ideas, or had a similar issue? We’re on v9.4.019 but we’re not sure how long ago the problem started as the users do not often create PDFs. [h=3][/h]

If production environment is on Linux maybe it’s missing the eXecute permission on file called to create the PDF.

Thanks Vincenzo. Good idea, but it’s a Windows server. Anyone have any other ideas?

Then try to see in the same folder where the PDF file should be, if there is file with same name but .log extension, it’s log file maybe there is an error listed, I don’t know on windows but on linux sometimes are missing some system libraries to the program that convert html to pdf.

Thanks Vincenzo, I didn’t know about the log files - that could be useful. The log file in this case doesn’t show any errors. it is just…

wkhtmltopdf --page-size Letter --orientation Portrait --header-right “[page]” https://xxxxx.co.uk/_apptest/_lib/tmp/sc_grid_patches_html_38116t47lel81ol3jp5ujgoba7.html C:/wamp/www/_apptest/_lib/tmp/sc_pdf_20200211145613_467_grid_patches.pdf

But there is still no PDF file in that path, only the log file.

Next step is, try to create the PDF,so you produce the log file and the html file, rename the .log changing the extension in .cmd, and then run it, maybe you can see something in console, or send console output to a file adding at the end >output.log and then see if there is somenthing in the output.log.

Thanks Vincenzo. Following this route, I’ve narrowed it down to the part of the SC code which calls exec wkhtmltopdf. One of the failing sites is a test site on shared hosting, so it could be that exec is disabled there. But the other is a WAMP and I checked the php.ini file and found that exec was not disabled there.

@bdl
maybe you could try this:
https://forum.scriptcase.net/forum/m…-http-or-https
using “C:/wamp/www” as “PDF server IP”.

Usually the issue is that wkhtmltopdf can’t connect to the web server URL and it could be due to one or more of these reasons: on the server the name is not resolved to the correct IP address - the web site requires authentication - the site is HTTPS and wkhtmltopdf is trying to use deprecated\unavailable SSL libraries (I’v seen this on linux servers) - the site is HTTPS only but if the prod environemnt is not configured SC could revert to HTTP

Thanks @robydago this solved my problem.