Linux permissions issue when executing wkhtmltopdf-amd64

前端 未结 5 1009
庸人自扰
庸人自扰 2021-01-17 21:39

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

QPainter::begin(): Returned false============================] 100%         


        
相关标签:
5条回答
  • 2021-01-17 22:16

    I know I'm late to the game here, but I was having this same issue. My issue was the fact that I was trying to write to a directory that didn't exist.

    I had assumed that wkhtmltopdf would create the directories that I passed it. It did not.

    Making sure the directories existed before trying to create my pdf solved it.

    I hope this helps someone else.

    0 讨论(0)
  • 2021-01-17 22:30

    make sure you have access to the directory ie : you are the owner and have write permissions when you run wkhtmltopdf http://www.google.com test.pdf

    you can always su sudo and try it out but generally i wouldn't write to any where but home just so i dont store junk in important places.

    0 讨论(0)
  • 2021-01-17 22:31

    I had this error for first time recently. I only want to add that if the name of the pdf have an special character this error will persist, independently if you have all the permissions granted. Be carefull with the name you choose to create the pdf

    0 讨论(0)
  • 2021-01-17 22:37

    I had the same problem.

    "You're probably missing the 32bit libraries. Try: sudo aptitude install ia32-libs" - http://code.google.com/p/wkhtmltopdf/wiki/static

    Worked for me

    0 讨论(0)
  • 2021-01-17 22:41

    Please use proper destination path with PDF file name. 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 讨论(0)
提交回复
热议问题