I'm running on a shared hosting service, downloaded wkhtmltopdf onto my hosting server and tried running it on the web site's home page. I got a message "cannot load default config file" but otherwise it worked and produced a nice PDF of my home page. Cool!
So I installed the print module and set up the configuration to offer the "save file" option, otherwise leaving all the wkhtmltopdf parameters the same. But when I click on the "PDF" link, I get no result.
In the log files it just says: "wkhtmltopdf: Loading page: 10% "
Can anyone please explain the reason for this and tell me what I am doing wrong?

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Something must have happened in the PDF generation process, if it stopped at 10%.

In my case, when generating a page, the following message is displayed in the log:

wkhtmltopdf: Loading page: 10% Loading page: 18% Loading page: 100% Waiting for redirect Outputting pages Counting pages 0 of 1 Printing page: 1 of 15 Printing page: 2 of 15 Printing page: 3 of 15 Printing page: 4 of 15 Printing page: 5 of 15 Printing page: 6 of 15 Printing page: 7 of 15 Printing page: 8 of 15 Printing page: 9 of 15 Printing page: 10 of 15 Printing page: 11 of 15 Printing page: 12 of 15 Printing page: 13 of 15 Printing page: 14 of 15 Printing page: 15 of 15 Done

Try to generate the output of the printer-friendly version directly in the command line. If it succeeds in generating the PDF, then the problem must be in the PHP limits for external programs.

João

joel_guesclin’s picture

I tried doing this, I tried two things:
First,

./wkhtmltopdf http://www.mysite.com/en/printpdf/book/export/html/25 test.pdf

This worked in the sense that it produced a PDF file, however the PDF file reproduced all the formatting of the web page whereas I had expected it to look more like the book print.
Second, I tried this:

./wkhtmltopdf http://www.mysite.com/en/print/book/export/html/25 test.pdf

Which gave me the print page in PDF format. I guess the external limits must be the problem as you say, unless you can think of anything else.

jcnventura’s picture

The second link is the closest that the module itself does. So it's not a problem of the page, nor of wkhtmltopdf.

I am guessing it's some PHP setting, most likely the memory limit.

joel_guesclin’s picture

Thanks for your help - I imagine that this is something I cannot change on a shared hosting service

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

No further info in two weeks. Closing the issue.