Is this the official developers mailing list?

221 views
Skip to first unread message

CoryR

unread,
May 29, 2012, 10:51:49 AM5/29/12
to wkhtmlt...@googlegroups.com
Is this the official list for wkhtmltopdf developers?

If so, I have a questions about compiling the patched version of Qt. I cloned wkhtmltopdf-qt and tried to compile it on my Windows machine with both mingw and Visual Studio (both targeting 32-bit architecture).

The MinGW build failed because of a weird thing MinGW does with <float.h> I found a fix for it and was able to compile until my memory was exhasted. It looks like both problems are fairly old (not 100% of this) and so I wonder how often wkhtmltopdf-qt syncs up with the Qt repository?

The Visual Studio build failed in a different spot but I ran out of time (and battery power) and never tracked down the problem.

I'm interested in adding a few more simple options (basically pass-through to the pdf).

Cory


Adam Hyde

unread,
May 29, 2012, 5:18:02 PM5/29/12
to wkhtmlt...@googlegroups.com
i think you can call it the official list for the official dev ;) a i understand it Jakob is the only dev...but i could be wrong with that....part of the outcomes of having this list is to extend the contributors...

Jakob Truelsen

unread,
May 30, 2012, 3:35:40 AM5/30/12
to wkhtmlt...@googlegroups.com
Yes this is the official list.

I have tried to compile in visual studio, but have failed. So the
windows binaries are compiled with mingw32 (under wine).

You can see the excact version of mingw and the exact procedure here:
https://github.com/antialize/wkhtmltopdf/blob/master/scripts/static-build.sh#L234

I am unsure about the state of the qt staging branch, I will try to
compile it tonight and if it fails fix it up so that it atleast
compiles with gcc.

Am glad that you want to contribute these features, please let me know
if you need any help, or if you persist in beeing unable to compile
the qt branch.

/Jakob

On Tue, May 29, 2012 at 4:51 PM, CoryR <co...@codeware.com> wrote:
> Is this the official list for wkhtmltopdf developers?
>
> If so, I have a questions about compiling the patched version of Qt. I
> cloned wkhtmltopdf-qt and tried to compile it on my Windows machine with
> both mingw and Visual Studio (both targeting 32-bit architecture).
>
> The MinGW build failed because of a weird thing MinGW does with <float.h> I
> found a fix for it and was able to compile until my memory was exhasted. It
> looks like both problems are fairly old (not 100% of this) and so I wonder
> how often wkhtmltopdf-qt syncs up with the Qt repository?
>
> The Visual Studio build failed in a different spot but I ran out of time
> (and battery power) and never tracked down the problem.

I have tried to compile in visual studio, but have failed. So the
windows binaries are compiled with mingw under wine.

Jakob Truelsen

unread,
May 30, 2012, 6:23:38 PM5/30/12
to wkhtmlt...@googlegroups.com
I have begun porting the patches to qt 4.8.2.

You can follow the progress here:
https://qt.gitorious.org/~antialize/qt/antializes-qt/commits/4.8.2

I still need to port the following patches:
dfb62d1 Propperly parse jpeg structure to find bit depth
3b3254f Propper handling of directly embedded grayscale jpeg images
8a6cb94 Add property viewBoxClip to QSvgGenerator allowing for not
including objects outside the viewBox
0f8b113 Smooth scale images when they are only transformed affine
9a53856 Instead of just blindly storing everything as JPEG, see if it
is better to gzip it
80fad5b Instead of just blindly storing everything as JPEG, see if it
is better to gzip it
3a4d577 Impose a maximum image dpi
d4ec266 Impose a maximum image dpi
551499d Use original jpeg images where possible
5a7f0c74 Use original jpeg images where possible

1ba19b1 Do not print the background on body elements if it happes to be white
23efcf5 Add support for using a mediatype diffrent from _print_ when printing
9567ac5 Added patch by acha...@ellex.com (And some small tweeks)
98b839f An element is on the page where its center point is, not its top point
01cbca4 Add a better API to control printing of webpages
d92bda4 Add support for custom print shrinking

d1668a2 Ugly hack to remove offending namespace code in xhtml
2de1164 Build webkit with xslt
efc04af Pretend that the output of all xslt processes is xhtml

6ac966d Fix bad merges
195402b Merge branch 'imageImprovements' into staging
1ce4704 Merge branch 'wk-shrink' into staging

I will work more on it tomorrow.

/Jakob

CoryR

unread,
May 30, 2012, 9:40:08 PM5/30/12
to wkhtmlt...@googlegroups.com
Very cool. I'll take another look at getting this to compile on my Windows 7 machine. I'll let you know how it goes.

Cory

Tom Taylor

unread,
May 31, 2012, 2:54:01 AM5/31/12
to wkhtmlt...@googlegroups.com, wkhtmlt...@googlegroups.com
On 30 May 2012, at 23:23, Jakob Truelsen <anti...@gmail.com> wrote:

> I have begun porting the patches to qt 4.8.2.

That's brilliant - I know we'll be able to make use of some of the newer CSS layout features.

I'm still wrapping my head around how qt and webkit interact, but is it possible to build qt against a trunk version of webkit, and build wkhtmltopdf against that? That would enable access to some of the even newer layout features that didn't make qt 4.8.

Cheers,

Tom

Jakob Truelsen

unread,
May 31, 2012, 7:09:47 AM5/31/12
to wkhtmlt...@googlegroups.com
Qt embeds webkit into src/3rdparty/webkit. I think you might just be
able to replace the content of that directory with the newer files
from webkit. However you might need to tinker with the qt build pro
files, and fix up other stuff. Also you will probably need to port
the patches to 5.0 once I get them ported to 4.8

/Jakob

LM

unread,
May 31, 2012, 7:22:53 AM5/31/12
to wkhtmltopdf Dev
On May 30, 6:23 pm, Jakob Truelsen <antial...@gmail.com> wrote:
> I have begun porting the patches to qt 4.8.2.
>
> You can follow the progress here:https://qt.gitorious.org/~antialize/qt/antializes-qt/commits/4.8.2
>

Managed to get wkhtmltopdf to build on Windows 7 with version 4.6.2 of
mingw and msys. I'd like to add in the qt patches and see if I can
get the extra features working (at least the table of contents and
links parts anyway). I've been working with qt 4.8.1. Didn't realize
4.8.2 was available. Will try that out next.

Is there any way to just get a tarball with the patches to qt instead
of having to work with the entire patched version of qt? Am building
qt from scratch (dynamically not statically) and attempting to
automate the process and it would be great if I could download the
official version, just run patch to apply the patches and then build
it. Are there any issue with using the patched qt with other qt
applications?

Thanks.

P.S.: I think wkhtmltopdf is a great tool and I recommend it to
anyone wanting to create documents.

Jakob Truelsen

unread,
May 31, 2012, 7:54:12 AM5/31/12
to wkhtmlt...@googlegroups.com
There is currently no way of automaticaly just extracting the patch
set. However the way I am setting it up on 4.8.2, the patches will be
all the commits to
http://qt.gitorious.org/~antialize/qt/antializes-qt/commits/4.8.2
after the commit with the message "Add wkhtmltopdf definition to
qwebframe.h" (note that as I rebase you can not use the id)

I have created the patches such that they only add featurs, so you
should be able to use the patched version of qt for all you other qt
needs.

/Jakob

LM

unread,
May 31, 2012, 2:57:59 PM5/31/12
to wkhtmltopdf Dev
On May 31, 7:54 am, Jakob Truelsen <antial...@gmail.com> wrote:
> There is currently no way of automaticaly just extracting the patch
> set.  However the way I am setting it up on 4.8.2, the patches will be
> all the commits tohttp://qt.gitorious.org/~antialize/qt/antializes-qt/commits/4.8.2
> after the commit with the message "Add wkhtmltopdf definition to
> qwebframe.h" (note that as I rebase you can not use the id)
>
> I have created the patches such that they only add featurs, so you
> should be able to use the patched version of qt for all you other qt
> needs.

Sounds good. I may give it a try.

I did try rebuilding wkhtmltopdf with qt 4.8.2 instead of 4.8.1 (no
changes to qt libraries). Not having such good luck with that version
of qt. (I'm using wkhtmltopdf-0.11.0_rc1.tar.bz2 by the way.) It
builds libwkhtmltox0.a and wkhtmltox0.dll in bin, but when running the
Makefile (in the src/pdf directory), it attempts to link with -
lwkhtmltox not -lwkhtmltox0. If I copy libwkhtmltox0.a to
libwkhtmltox.a and try again, I get:

g++ -Wl,-s -Wl,-subsystem,console -mthreads -o ../../bin/
wkhtmltopdf.exe object_script.wkhtmltopdf.Release -L'c:/mingw/msys/
opt/qt-4.8.2/lib' -L../../bin -lwkhtmltox -lQtWebKit4 -lQtSvg4 -
lQtXmlPatterns4 -lQtGui4 -lQtNetwork4 -lQtCore4 ./../../build/
pdfarguments.o:pdfarguments.cc:(.text
$_ZN6CallerI14DefaultTocFuncEclEPPKcR21CommandLineParserBasePc[Caller<DefaultTocFunc>::operator()
(char const**, CommandLineParserBase&, char*)]+0x5f): undefined
reference to
`_imp___ZN11wkhtmltopdf24dumpDefaultTOCStyleSheetER11QTextStreamRNS_8settings14TableOfContentE'

collect2: ld returned 1 exit status

Thought it was strange it built without any hitches in qt 4.8.1 but
not with 4.8.2.

leslie Lau

unread,
Aug 2, 2013, 4:10:33 PM8/2/13
to wkhtmlt...@googlegroups.com
Hi Cory,

I know it's been a while...but I'm trying to compile on Windows 7 as well but haven't had any luck.  Were you able to successfully compile on Windows 7? If so, could you share what you had to do to get it to work?

Leslie
Reply all
Reply to author
Forward
0 new messages