I would like to use the export > pdf feature (and the email api to send reports as an attachment) from the grid. It works on the localhost on the box where SC is installed (127.0.0.1). It does not work if I am using SC remotely (http://www.mydomain.com). I do all of my development from my home office (windows 10) and deploy to another location on the web (Linux Server). The grid export to PDF does not work on the web - at either my home office or the application deployed on the web. It works with Word, Excel, XML, CSV, RTF and PRINT. PDF is the only export option that does not work. The box that SC is installed on is Windows v7. I have also tried a server deployment on the w7 box and that does not work either. It ONLY works if I am physically logged onto the w7 box … the browser url is “127.0.0.1:Port/scriptcase/tmp/…” I have verified permissions are set on the tmp directory it writes to - and it does write to that directory - I can see that it creates the log and html file - it appears to be an issue with wkhtmltopdf creation of the pdf file. Is there something that I need to do with the wkhtmltopdf executable to make this work?
Well, the exe will not run on the linux system. However, I’m not sure how to configure the pdf libs to use another method. It might be necessary to do a custom deploy in stead of a standard deploy. In the custom deploy there are a lot of settings to play with, perhaps pdf is one of them? Not sure tbh… I deploy to shared hosting and it works without issues…
You know I know that … duh … haven’t really tried to deploy to linux … it doesn’t work in my development (windows10) and I tried to deploy locally on the box where SC is installed … doesn’t work there either. ONLY works when the host is local host 127.0.0.1.
That is odd. My first guess would be that the webserver is only listening to localhost, but that’s not logical if you can reach it from outside and only the pdf fails.But what do you do when using remotely. Perhaps a stupid question, but I simply don’t understand as www.mydomain.com is confusing me. Or does it lead to your dev system?
After exporting the system, common and project files to the Linux server, I always have to reset permissions of the executable files in the wkhtmltopdf folders to 0755 for the PDF export to work. Like you, my export works fine in the local development environment but never in the production environment. Resetting those permissions works for me.
Go to: path/to/_lib/prod/third/wkhtmltopdf/ and change permissions of the wkhtmltopdf-amd64 file in the linux-amd64 folder to 0755 (if your Linux server is 64-bit) or the wkhtmltopdf-i386 file in the linux-i386 folder if you’re running a 32-bit version. I do the same to the wkhtmltopdf-amd64 file (or i386) in the “stretch” folder as well.
Thank you. Good information!