Export to PDF Does not Work

Please bug me if you find an answer to this problem. I will do the same back to you.

You can put the IP of your domain or www.yoursite.com
I have over 30 Scriptcase apps in different hostings. In some it doesnā€™t work because security issues, in others works fine and others I must send a message to the support to enable the wkhtmltopdf.exe in that site. Sorry for my English.

Most definitely! Thanks again!

Your English is way better than my [insert your language here]! I tried the permissions settings you suggested and still no joy. Also, putting the IP (as in IP address) didnā€™t help, but perhaps thatā€™s because there are other issues. But Iā€™m still working on it and security is what Iā€™m checking out next. Youā€™ve been a big help.

I remember that sometimes I upload the file again alone and then put the 744 permission again.

Because get corrupted.

Hi guysā€¦I have the same problem a year agoā€¦with 9.4 and 9.5 versionsā€¦and I have tried all what you have commentedā€¦but seams that Scriptcase doesnā€™t matter about this issueā€¦
Any new idea for solving this head acheā€¦?

Regards
Sergio C.

Still no solution to this. Iā€™ve tried everything above. Finally, with some help from SC support (through the bugs@scriptcase.net) Iā€™ve found that there is a missing library on my server, which runs Centos 7 64 bit Linux.

Running the command in the terminal which appears in the log file after attempting an export yields the following error:

error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory

Now Iā€™m trying to figure out how to get that installed on the server. Iā€™m not a server admin so if anybody can point me to the instructions, that would be very helpful.

I had the same problem and started with the Journey

  1. I had ask the hosting provider to install wkhtmltopdf on the server and gave them the link https://wkhtmltopdf.org/.
  2. The next step was testing to see if the image are being generated. xxxx is the application name.
    check if images are generated in public_html/xxxxxx/_lib/tmp (you can clear this folder)
    if not the problem is with phantomjs located in public_html/xxxxxxx/_lib/prod/third/phantomjs/linux-amd64.
    I downloaded the phantomjs from https://phantomjs.org/download.html
  3. Check to see if the pdf file is being genearted in public_html/xxxxxxx/_lib/tmp
    If not the problem is with wkhtmltopdf-amd64 in public_html/xxxxxxxx/_lib/prod/third/wkhtmltopdf/linux-amd64
    It must also have execute enabled chmod 0777
    Found the latest version of wkhtmltopdf on https://wkhtmltopdf.org/downloads.html

Note: These files get overwritten ever time you do a full Deployment to the server, so keep copies.

1 Like

Someone else finally got this solved. Here is a link to that discussion -

@Paul_Van_Geel
Have you followed the steps in the previous post and made sure that the security settings are correct?

Yes. I had tried to chmod 777 on the directory for the wkhtmltopdf, but it did not work. The solution in the referenced discussion did. The only problem is that when you update the deployment the file gets overwritten, and you need to reinstall the proper files again. That stated I created a script to do the work for me each time I update the deployments of my programming.

@Paul_Van_Geel
Excellent idea.
can you share the script?

Here is the script that I wrote. Modified it a bit for others to use. This was written for Ubuntu Linux and should work for any Debian varieties. I also have root access since I run the server.

cd /var/www/html/<your directory>/_lib/prod/third/wkhtmltopdf/linux-amd64
sudo cp /usr/local/bin/wkhtmltopdf wkhtmltopdf-amd64
sudo chmod -R 777 /var/www/html/<your directory>/_lib/prod/third/wkhtmltopdf

Of course the <your directory> will need to be modified. Chmod this to 755 and chown it to root:root. I named the file ā€œhtmltopdfā€ Then when you run it use the command -

sudo ./htmltopdf

This will get the wkhtmlpdf file into the correct area to solve the problem with pdfs from grids. These instructions do assume that you have already installed the newer version of wkhtmlpdf from the git repository. If not see the discussion that was already referenced here.

Thank you @Paul_Van_Geel
I will used this