Bug 1140279 - wkhtmltopdf requires running X [NEEDINFO]
Summary: wkhtmltopdf requires running X
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: wkhtmltopdf
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-10 15:49 UTC by Erinn Looney-Triggs
Modified: 2020-11-24 15:25 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:
projects.rg: needinfo? (lkundrak)


Attachments (Terms of Use)

Description Erinn Looney-Triggs 2014-09-10 15:49:40 UTC
Description of problem:
It appears that the build of wkhtmltopdf requires a running X server. I know it is possible to have this binary built in such a way that id does not require X to be running. Would it be possible to build it that way? Hopefully not many servers are running X.


Version-Release number of selected component (if applicable):
wkhtmltopdf-0.11.0-0.2.rc1.el7.1.x86_64

How reproducible:
wkhtmltopdf hello.html hello.pdf
wkhtmltopdf: cannot connect to X server

Comment 1 Rex Dieter 2014-09-10 16:09:23 UTC
https://code.google.com/p/wkhtmltopdf/issues/detail?id=3

claims this requires some Qt support/patch.  Its possible that never got upstreamed (pretty sure fedora/rhel Qt packages don't include the patch separately).

Comment 2 Adam Bellas 2015-01-03 19:44:07 UTC
Adding my voice to this issue. Some people are finding unsavory workarounds for this (https://github.com/KnpLabs/snappy/issues/89) that could have negative impact down the road as software ages.  The virtual x-server seems to be the most popular workaround.

I ran into this issue within a Vagrant-powered Fedora development environment.  Using the yum installer during provisioning to assemble everything, including wkhtmltopdf.

Comment 3 Rex Dieter 2015-01-03 20:03:20 UTC
Looks like the original issue reference is no longer valid, seems the project has moved to
http://wkhtmltopdf.org/
and
https://github.com/wkhtmltopdf/wkhtmltopdf/issues

and I don't see this issue documented there yet... hint hint. :)


I do see some Qt-related forked projects under
https://github.com/wkhtmltopdf/

but it's not clear to me offhand which commits (patches) wkhtmltopdf requires.

Comment 4 Remi Collet 2017-11-11 11:08:29 UTC
Working on a PHP extension which is mostly a bindings for this library, I encounter the same issue, X is mandatory

While the init is properly called with use_graphics=0

From the code lot of things use __EXTENSIVE_WKHTMLTOPDF_QT_HACK__

This can be checked using

#include <stdio.h>
#include <wkhtmltox/pdf.h>

int main (int argc, char *argv[]) {
	printf("Extended: %d\n", wkhtmltopdf_extended_qt());
	return 0;
}


This currently returns 0 (which 1 seems needed)

Comment 5 customercare 2018-01-08 16:20:22 UTC
Workaround:

xvfb-run --server-args="-screen 0, 1024x768x24" /usr/bin/wkhtmltopdf ... options...


but i highly recommand to compile without x support, as this solution is slow
and completly unnecessary as other versions show.

Comment 6 Rex Dieter 2018-01-08 16:37:04 UTC
I see it documented now at:
https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2811
at least

Comment 7 customercare 2019-04-08 15:10:06 UTC
No progress with this for over a year here@brhc nor at github ... ideas?

Comment 8 Raphael Groner 2020-03-16 22:27:20 UTC
Ping.

Comment 9 Frank Duerr 2020-11-24 15:25:43 UTC
Will this ticket be processed at some point? Status "New" since 2014?!


Note You need to log in before you can comment on or make changes to this bug.