Linux permissions issues when running wkhtmltopdf-amd64

When I run the executable file "wkhtmltopdf-amd64" (from Linux), I get the following output:

QPainter::begin(): Returned false============================] 100% Error: Unable to write to destination Exit with code 1 due to http error: 403 Forbidden 

I saw on other forums that this is due to the lack of write permissions for the temporary file. What directory do I need to write for "wkhtmltopdf-amd64" to create a temporary file?

+7
source share
5 answers

make sure that you have access to the directory, that is: you are the owner and have write rights when running wkhtmltopdf http://www.google.com test.pdf

you can always su suudo and try it, but as a rule, I would not write to anyone except at home, so I did not store garbage in important places.

+2
source

I had the same problem.

"Probably you are missing 32-bit libraries. Try: sudo aptitude install ia32-libs" - http://code.google.com/p/wkhtmltopdf/wiki/static

Worked for me

0
source

I know that I'm late for the game here, but I had the same problem. My problem was that I was trying to write to a directory that did not exist.

I assumed that wkhtmltopdf would create the directories by which I passed it. This is not true.

After making sure that the directories existed before he tried to create my pdf, he decided.

I hope this helps someone else.

0
source

Please use the correct destination path with the name of the PDF file. Here is an example:

 [xyz]$ wkhtmltopdf "https://www.google.co.in/?gfe_rd=cr\&ei=7n1LVeKNOMPCuAGDjoGACw\&gws_rd=ssl" /tmp/test/web/jj.pdf Loading pages (1/6) Counting pages (2/6) Resolving links (4/6) Loading headers and footers (5/6) Printing pages (6/6) Done [xyz]$ 
0
source

I had this error for the first time in recent times. I just want to add that if the pdf name has a special character, this error will be saved independently if you have all the permissions granted. Be careful with the name you decide to create pdf

0
source

All Articles