PDF Export Linux wkhtmltopdf-amd64

I have an issue with exporting grids to pdf, this issue has been discussed before and I have reviewed many threads about it.
I can report that if I select any other export format eg csv,xls, word the file is generated in the …/_lib/tmp directory correctly, which makes me suspect the problem is with wkhtmltopdf-amd64

On my DEV server(not SC Dev) running Ubuntu 16.04 it exports to pdf without any issues. On my Prod servers (Fedora 23/24)
It seems like it exports but the pdf file is never created. The _lib/tmp dir contains a log of the command it ran to generate the pdf:
./wkhtmltopdf-amd64 --page-size Letter --orientation Portrait --outline-depth 0 --header-right “[page]” http://mysite.mydomain/Billing…f73n3ttc3.html/var/www/html/BillingReminder/_lib/tmp/sc_pdf_20161107115627_947_grid_Agreements.pdf

but the pdf file is not generated.

, I ran my own test by executing:
./wkhtmltopdf-amd64 http://www.google.com google.pdf
./wkhtmltopdf-amd64: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory

Which means The Unix packages x11-libs/libXext and x11-libs/libXrender are dependencies,

I installed them: dnf install libXext libXrender

Reran the command and it generates a pdf:

​./wkhtmltopdf-amd64 http://www.google.com google.pdf
Loading pages (1/6)
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done

After installing the dependencies I expected the export to work but it still never generates the file.
Any suggestions appreciated.

EDIT*
The html file created in /_lib/tmp for the export on Fedora has the following file permissions set 644 -rw-r–r--

Running the command in the log file in /_lib/tmp :
./wkhtmltopdf-amd64 --page-size Letter --orientation Portrait --outline-depth 0 --header-right “[page]” http://mysite.mydomain/Billing…f73n3ttc3.html/var/www/html/BillingReminder/_lib/tmp/sc_pdf_20161107115627_947_grid_Agreements.pdf

resutls in:
Loading pages (1/6)
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done
Exit with code 2 due to http error: 404 Page not found

The issue was also reported for another php wrapper for wkhtmltopdf here:https://github.com/mikehaertl/phpwkhtmltopdf/issues/10

Well then it seems the Problem is with the version of wkhtmltopdf that ships with SC 8

I downloaded the latest version here: http://wkhtmltopdf.org/downloads.html and replaced the scriptcase version /_lib/prod/third/wkhtmltopdf/linux-amd64 with it.
and viola [ATTACH=CONFIG]n72958[/ATTACH]

Can someone from SC at least confirm this ? Then it becomes a BUG or a known issue.

exporter.png

Hi guys

I had the same problem: System: Ubuntu 16.04.2 LTS, Scriptcase 8.1.066. I was able to generate a pdf-application, but when I wanted to generate a pdf out of a grid no pdf was generated.

I solved the problem by installing the latest version of wkhtmltopdf:

  apt-get install wkhtmltopdf

And now everything works fine :slight_smile:

Best regards,

HoWin