Reputation: 414
I'm running wkhtmltopdf 0.12.4 on Mac OS 10.11.6. When I try to run the basic example "wkhtmltopdf http://google.com google.pdf", though, I'm getting an unusual output. Where I'm expecting something like this:
(PDF generated directly from Chrome), I'm instead getting this:
It seems odd to me that the default output should be so far off, but I've tried some options as well (including --disable-smart-shrinking) with no luck. Would appreciate any direction you can offer!
Upvotes: 2
Views: 4084
Reputation: 11
I have been trying to use the 0.12.4 version on Mac OS 10.13.3. Adding some information about this issue.
Upvotes: 1
Reputation: 61
Same here with Mac OS 10.11.6 WKHTMLTOPDF v 0.12.4.
Using --lowquality
is the only thing that seems to resolve the "tiny output" issue.
Default wkhtmltopdf output without --lowquality
:
screenshot
With --lowquality
, "tiny output" issue is fixed (and works with additional options like increasing resolution via --viewport-size):
--lowquality screenshot
Upvotes: 6
Reputation: 56
I had the same problem, using wkhtmltopdf version 0.12.4 on a Mac installed via homebrew. I uninstalled that and tried version 0.12.3, downloaded from http://wkhtmltopdf.org/, and now I have normal size output.
Upvotes: 4
Reputation: 187
I encountered this issue when running wkhtmltopdf
on very large screens, and found that specifying print media-type instead of screen media-type, i.e. via --print-media-type
, resolved the issue.
For example:
wkhtmltopdf --print-media-type http://google.com google.pdf
Upvotes: 0
Reputation: 4776
To solve problem install wkpdftohtml
via
brew install Caskroom/cask/wkhtmltopdf
Upvotes: 0