Help installing static binary for wkhtmltopdf
Asked Answered
G

4

12

I am trying to use the static binary of wkhtmltopdf on Ubuntu server 10.0.4. The reason for is that it apparently has a built in modified QT that will allow me to run wkhtmltopdf without an X Server.

Result: Once installed (see steps below), when I execute wkhtmltopdf in the terminal, it does not fire up... just returns me to the prompt - like it ran and did something, no error but no output:

:/usr/bin$ wkhtmltopdf

:/usr/bin$

Same behavior if I put args:

:/usr/bin$ wkhtmltopdf http://www.google.com test.pdf

:/usr/bin$

Am I doing something wrong --- my understanding that the static binary should just fire up. Perhaps missing some dependency? Is there a way to get some verbose output?

These are the steps I have followed:

In /usr/bin:

1) Confirmed that the existing (non-static) wkhtmltopdf resides there and that it executes. When I execute it with no args I get the help/about output from the app.

2) Moved the existing wkhtmltopdf out of the directory (renamed it)

3) Get the static binary: sudo curl -C - -O http: //wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-i386.tar.bz2

4) Untar: tar xvjf wkhtmltopdf-0.9.9-static-i386.tar.bz2

5) Rename: mv wkhtmltopdf-i386 wkthtmltopdf

6) Get (apparently) necessary packages: sudo apt-get install openssl build-essential xorg libssl-dev

Gang answered 14/9, 2010 at 21:19 Comment(2)
Make sure you are using the correct binary. If you're not sure try the amd64 binary instead and see if it works.Smithsonite
Did you ever solve this? I am having EXACTLY the same issue!Loria
F
23

I was having the same problem. I removed the existing wkhtmltopdf and followed the steps below and the installation worked.

First, installing dependencies

sudo aptitude install openssl build-essential xorg libssl-dev

for 64-bit OS

wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.2-static-amd64.tar.bz2

tar xvjf wkhtmltopdf-0.9.2-static-amd64.tar.bz2

chown root:root wkhtmltopdf-amd64

mv wkhtmltopdf-amd64 /usr/bin/wkhtmltopdf

The only difference is that I put it in /usr/local/bin/wkhtmltopdf.

I hope this helps!

Flemming answered 15/10, 2010 at 19:58 Comment(2)
Doesn't that just install the xorg XServer to your box? So the install is still using an XServer, right?Geffner
Instead of full X, you can pull only the libxrender: apt-get install libxrender1Milan
T
2

Following deb's answer got it working for me on Ubuntu 10.04 64bit - thanks!

Although rather than downloading 0.9.2 as per deb's instructions, I would suggest people download the latest version by:

  1. Go to http://code.google.com/p/wkhtmltopdf/downloads/list
  2. Download the latest version of wkhtmltopdf-[version number]-static-amd64.tar.bz2

At this time, the latest 64bit is http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1-static-amd64.tar.bz2.

Transparent answered 10/6, 2012 at 6:28 Comment(1)
Link code.google.com/p/wkhtmltopdf/downloads/list is broken. It does not show any filesResponsible
L
0

In my debian server trying to run wkhtmltopdf-i386 lead to same blank prompt.

Non-static (with non-patched QT) version of wkhtmltopdf installed with "aptitude install wkhtmltopdf" is worked.

Problem solved by switching to wkhtmltopdf-amd64, server was a 64 bit and i missed it.

After that, wkhtmltopdf-amd64 says 'libxrender shared library not found', this problem was solved by "aptitude install xorg"

Lightweight answered 1/5, 2012 at 20:47 Comment(0)
B
0

0.11.0_rc1 seems to be buggy.
It keeps throwing the error "Cannot create a QPixmap when no GUI is being used".
Reverting to 0.9.9 worked for me.

Branny answered 8/7, 2012 at 2:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.