Problems with PDF generation

Hi,

For an unexplicable reason my SC PDF generator stops working, I gave its appropiate privileges then I tried to generate using the console but the following message is showed.

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

Please help me.

I get this error if I use https in the url or if I use .htacess in a directory, so wkhtmltopdf can’t write to the tmp.

Joe

By chance, are you running Linux?

I had similar problems with https, my solution is to replace wkhtmltopdf file with the one I downloaded from http://wkhtmltopdf.org
I’m using linux so I replace the one in _lib/prod/third/wkhtmltopdf/linux-amd64 and make the file permission executable or 755

Yes bro. I’m using linux.

Which version did you download?

It is weird because from console I generate the report but from the grid application can’t be done.

This is the version I use, wkhtmltox-0.12.3_linux-generic-amd64.tar

btw, did you try this to see what error msg you have? https://support.scriptcase.net/index…sage-not-found
fyi, by using the above method, I received the following message:
[SIZE=10px]Loading pages (1/6)[/SIZE]
[SIZE=10px]QSslSocket: cannot resolve SSLv2_client_method ] 10%[/SIZE]
[SIZE=10px]QSslSocket: cannot resolve SSLv2_server_method[/SIZE]
[SIZE=10px]Error: Failed loading page[/SIZE]

Your problem is likely different from the one I experienced - one that was related to SE Linux.
I know that there is a library / .so that is not loaded for Linux by default. I don’t remember which off the bat but it would normally complain about that from the command line.

Since it is complaining about an HTTP error you should try looking at the /var/log/httpd/error_log file just after trying execution to see what error occurred. When these sorts of issues come up, I leave a terminal session with a tail -f /var/log/httpd/error_log command running so I can see what’s going on.

NB In my setup, I use the ‘default’ Apache HTTP server, not the one that ScriptCase supplies.
Their httpd error log may be in a different place. Use the find command to find where it is.

Just for completeness, are you running with SE Linux enabled?
If so, don’t give in to those who will tell you that the fix is to disable it.

this is the version that is currently installed “wkhtmltopdf 0.10.0 rc2”, in fact de PDF is generated but something happend that throws the 404 error, that starts happen when I update the SC prod enviroment, because I didn’t do nothing with the server config. maybe SC updates the wkhtmltopdf library I think.

I started having problems when I switched two of my sites over to https. WKHTMLTOPDF stopped working. The HTML file, CSS file and LOG file were all created, but the PDF was not being written to the _lib/tmp folder. What bwalujo suggested DOES WORK. The file from wkhtmltopdf.org is much larger (39MB) but if you upload it to the appropriate version folder in your SC _lib/prod/third/wkhtmltopdf/ directory and CHANGE ITS NAME TO THE DEFAULT EXE FILE IN THAT FOLDER, it will work with https. Permissions are also important. 0755.

My question now is why do we have to do a hack like this? Why can’t the executable that comes with the SC libraries work with https? The version of WKHTMLTOPDF that is currently included with SC 8.1 does not work with https (AFAIK).

THANK YOU BWALUJO!

What I’m doing for now is including the “full” version (39MB) in my SC 8.1 library on my devlopment machine (named appropriately) so when I upload SC libraries, it’s already included.

Yes the only solution is update WKHTMLTOPDF to wkhtmltox-0.12.3_linux-generic-amd64.tar and upgrade the glib to the version 2.10