Page 1 of 1

wkhtmltopdf - html to pdf converter

Posted: Sun 24 Feb 2013, 10:05
by Dromeno
PuppyPDF does work for this but not optimal, PeasyPDF can not yet handle html pages

https://code.google.com/p/wkhtmltopdf/ produces better results

would be great if there was a pet available

Posted: Sun 24 Feb 2013, 11:17
by muggins
@Dromeno,

As it's a commandline utility, & the static compiled release here runs, why do you need a pet?

Posted: Sun 24 Feb 2013, 12:09
by rcrsn51
What about doing this?

1. Open the HTML document in your web browser.

2. Select Print > Print to File

3. Select PDF output and give the output file a name.

Posted: Sun 24 Feb 2013, 12:39
by muggins
rcrsn51,

I did that, using this page as the input, & it gave me a pdf with one line at the top, & one at the bottom, but no content in between. Whereas, using wkhtmltopdf, gave me the full document, and a slightly smaller pdf as well.

Posted: Sun 24 Feb 2013, 12:41
by rcrsn51
What browser are you using?

Thx!

Posted: Tue 05 Mar 2013, 09:40
by Dromeno
Muggins, thanks!

command not found?!

Posted: Tue 05 Mar 2013, 09:49
by Dromeno
Hm... what do I do wrong? I unzipped https://wkhtmltopdf.googlecode.com/file ... 86.tar.bz2

to

/root/Downloads/wkhtmltopdf-i386

then changed permissions, opened a terminal in the Downloads directory, typed

wkhtmltopdf-i386 --help

and got 'command not found'

same for

wkhtmltopdf --help

'command not found'

Posted: Tue 05 Mar 2013, 11:43
by muggins
and got 'command not found'
Either extract to /usr/bin, or symlink binary to /usr/bin.
What browser are you using?
Yes, I was using chromium. Works fine with firefox.

Posted: Sat 30 Mar 2013, 21:43
by aragon
dromeno,

if you run a binary in the same directory where it is located, you need to prefix it with ./ in your example that would be

./wkhtmltopdf-i386 --help

aragon