This was tested on:
- Ubuntu 14.04 x64
- Ubuntu 16.04 x64
sudo apt-get update
sudo apt-get install xvfb libfontconfig wkhtmltopdf
Now it's time to test that everything is working as expected
wkhtmltopdf http://www.google.com google.pdf
If you see Done
, then everything is installed correctly and you're ready to generate some PDF's :D
I am using the latest version of wkhtmltopdf i.e 0.12.6. I am trying to convert an html using the command line, but it is gives me invalid pdf. but when i do the same procedure using wkhtmltopdf version 0.12.4, it works fine. I am not able to figure it out the reason, Am i missing something in the latest version?
wkhtmltopdf -s A2 --viewport-size 1280x1024 --orientation Landscape https://authlink-files-storage.ams3.digitaloceanspaces.com/authlink_prod/organization_docs/temp/doc_2020_07_31_00_00_a171ca5c669a4e81b9834ebbf844e89b a.pdf