wkhtmltopdf - html to pdf converter

Requests go here. If you fill a request, give it a new thread in the appropriate category and then link to it in the request thread.
Post Reply
Message
Author
Dromeno
Posts: 534
Joined: Fri 12 Sep 2008, 07:01

wkhtmltopdf - html to pdf converter

#1 Post 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

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#2 Post by muggins »

@Dromeno,

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

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#3 Post 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.

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#4 Post 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.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#5 Post by rcrsn51 »

What browser are you using?

Dromeno
Posts: 534
Joined: Fri 12 Sep 2008, 07:01

Thx!

#6 Post by Dromeno »

Muggins, thanks!

Dromeno
Posts: 534
Joined: Fri 12 Sep 2008, 07:01

command not found?!

#7 Post 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'

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#8 Post 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.

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#9 Post 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

Post Reply