Reputation: 15227
I'm trying to run wkhtmltopdf from my c# code but it keeps returning a 1301 or 1005 error. I can't find anything regarding these error codes, any ideas? I'm using the --print-media-type
switch so I the pdf will look the same as if it were printed on a physical printer. The pdf does get created, it is just 0 bytes long.
here is the command line parameters:
wkhtmltopdf.exe http://google.com google.pdf --print-media-type
Upvotes: 1
Views: 1392
Reputation: 15227
After much heartache and frustration, I've discovered that the --print-media-type
switch needs to be after the html location BUT BEFORE the pdf location.
wkhtmltopdf.exe http://google.com --print-media-type google.pdf
works as desired.
Upvotes: 1