viggity
viggity

Reputation: 15227

wkhtmltopdf http error 1301 and 1005

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

Answers (1)

viggity
viggity

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

Related Questions