Git Product home page Git Product logo

wkhtmltopdf's Introduction

wkhtmltopdf and wkhtmltoimage

wkhtmltopdf and wkhtmltoimage are command line tools to render HTML into PDF and various image formats using the QT Webkit rendering engine. These run entirely "headless" and do not require a display or display service.

See https://wkhtmltopdf.org for updated documentation.

Building

wkhtmltopdf has its own dedicated repository for building and packaging.

See https://github.com/wkhtmltopdf/packaging

wkhtmltopdf's People

Contributors

a-ctor avatar antialize avatar ashkulz avatar bsinky avatar cub-uanic avatar dmlambea avatar esemi avatar frenkel avatar icnocop avatar jangid avatar nickgaya avatar nicovogel avatar npinchot avatar peterrehm avatar poizan42 avatar pruiz avatar pussbb avatar rdvojmoc avatar renan avatar ro0gr avatar sanderkleykens avatar skennedy avatar sodabrew avatar sormy avatar stweil avatar theirix avatar tomsgu avatar trvrnrth avatar unlimitedsola avatar uuf6429 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wkhtmltopdf's Issues

Syntax error: "(" unexpected

Hello,

When I am running the build_linux.sh, I get an error in the console :
build_linux.sh: 26: build_linux.sh: Syntax error: "(" unexpected

I tried to add "linux-amd64" but it didn't work.
I'm on Ubuntu 13.10 amd64.

I tried to locate the problem but I don't see from where it can come (bash is not my best skill :D )
All the prerequisites were successfully installed before launching the command.

rendering noticeably slower in the "Printing pages" phase

wkhtmltopdf is doing a much much better job at handling page breaks than PhantomJS (Qt4.8.4)... There's no doubt about that. What I've found though is that wkhtmltopdf is running much more slowly than PhantomJS.

On a single test here PhantomJS is rendering a 2 ½ page PDF in less than 4 seconds, while wkhtmltopdf is up at almost 14 seconds.

I'm wondering if there's some sort of debug flag or something that may be slowing things down. Or maybe the page-break algorithm just more computationally expensive?

Pb with font-face?

Get to Osx version of wkhtmltoimg, a 0.10.0 rc2 and the last one a 0.12.1 b766b3382594ea0801345817b837b65a1fa74e6c from npinchot (as advices in the download page).

The first render the fonts but the last one did not, tried the wkhtmltopdf from npinchot and got the same result (no font).

Regards,

[OS X] warning message about CFURLGetFSRef on every invocation

This is the message I get all the time:

/Users/mn/Documents/......
==> ./wkhtmltopdf test.html test.pdf
Loading pages (1/6)
2014-02-16 15:06:42.459 wkhtmltopdf[58021:707] CFURLGetFSRef was passed this URL which has no scheme (the URL may not work with other CFURL routines): ./
Counting pages (2/6)                                               
Resolving links (4/6)                                                       
Loading headers and footers (5/6)                                           
Printing pages (6/6)
Done

I used wkhtmltox-macosx-10.9.1-x86_64-0.12.1-development-593ac96.tar.xz from Sourceforge.

set window width for responsive website printing

When you try to print to PDF a website that is responsive, the screen width looks like a smartphone one. Not very appealing on a A4 format.
It works fine with wkhtml2image though.
wkhtml2image :
responsive

wkhtml2pdf :
screenshot from 2014-02-06 16 07 16

(if there's already an option for that i didn't found it, sorry)

Where should people download the binaries from?

GitHub has a "Downloads" section where binaries can be hosted for the general public to download from, right? Shouldn't that section be enabled, and the binaries hosted there?

Even if we want to continue hosting the binaries on this Google Drive, shouldn't we mention that link somewhere? Maybe in the README?

Exit code / http error documentation

When testing I kept getting exit code 1 quite often due to http error 1005 or 1xxx. Is there any documentation on exit codes and http error codes? It seems like exit code 1 usually can be ignored and happens only when something doesn't return 200 or such on the page. But what about the http errors? Http error 1005 doesn't really tell me anything

From looking at https://github.com/wkhtmltopdf/wkhtmltopdf/blob/master/src/lib/utilities.cc it would look to me like anything returning 404 would mean a returncode 2 and 401 would be 3 and anythign else is 1. Error 1005 doesn't sound like any http error I know. If I didn't fail it comes from PdfConverter's httpErrorCode() and there it comes from pageLoader.httpErrorCode(), but that's as far as I got tracing them from the source.

Documentation would be helpful in knowing which errors to ignore, currently it would seem to me like exit codes 0, 1, 2 and 3 can just be ignored quite safely.

problem with non-ASCII characters in output path on Windows

When I run "wkhtmltopdf.exe" from cmd and the output path contains greek characters, the response is:

QPainter::begin(): Returned false
Error: Unable to write to destination
Exit with code 1, due to unknown error.

When only the output filename has greek characters, the filename looks like "������������.pdf"

There is no problem when only the input path contains greek characters.

Thank you very much!

wkhtmltopdf fails to print pages, is killed

On certain URLs, printing fails half way through

$ wkhtmltopdf http://deckbrew.com/api/index.html ~/api.pdf
Loading pages (1/6)
QSslSocket: cannot resolve SSLv2_client_method               ] 10%
QSslSocket: cannot resolve SSLv2_server_method
Counting pages (2/6)                                               
Resolving links (4/6)                                                       
Loading headers and footers (5/6)                                           
Printing pages (6/6)
Killed=====================>                                  ] Page 3 of 7

OS: Ubuntu 12.04 64bit running in a VM
Version: 0.12.0, downloaded today from the website

Font being cutted by right margin

When I use bolded font (ttf, woff) aligned to the right side of a page, small fragment of text is being cutted by right margin.
I could try to fix it by adding small left-right padding in CSS, but before I do that I want to know if is any chance that it will be fixed by wkhtmltopdf?

wods breaks on non ascii letters

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body >
<table>
<tr>
<td>this_shouldnt_break_ów</td>
<td>this_shouldnt_break_ow</td>
<td>this_shouldnt_break_ń</td>
<td>this_shouldnt_break_n</td>
<td>placeholder</td>
<td>placeholder</td>
<td>placeholder</td>
</tr>
</table>
</body>
</html>

$wkhtmltopdf tmp.html tmp.pdf

words in table shouldnt break at non ascii letters but they do.

My wkhtmltopdf version:
wkhtmltopdf 0.9.6

wkhtmltopdf depends on other shared libraries on Linux

Or I assume it's looking for the X11 server. I tried the pre-compiled version, as well as compiling from source. I get the following error

./wkhtmltopdf: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory

So I installed libxrender1, then I got an error message about missing libfontconfig. I'm running Debian wheezy, and everything I've read so far states the patched qt doesn't require X11, and the install document doesn't mention any prereqs aside from git-core, debootstrap and xz-utils. What am I missing??

EDIT: Build v0.12.0

Inexact size of elements

Using

./wkhtmltopdf -T 2cm -R 2cm -B 2cm -L 2cm test.html test.pdf

with the following HTML

<html>
<head>
    <meta charset="utf-8"/>
    <style type="text/css">
        body {
            width: 17cm;
            margin: 0;
        }
    </style>
</head>
<body>
  <div style="margin: 0; background-color: green; width: 100mm;">100mm</div>
</body>

should produce a green

element with a width of exactly 100mm.

On OS X this was the case with previous versions but with the current build the

has a width of about 103 mm.

On Windows you have to use --zoom 1.3 to get the correct width (--zoom was always necessary with previous versions on Windows). Is there any reason for the different behavior on both platforms?

Checked with wkhtmltox-win64_0.12.1-development-773cad3.exe and wkhtmltox-macosx-10.9.1-x86_64-0.12.1-development-593ac96.tar.xz from Sourceforge.

Zoom effect

What's the problem?
Using the old version I could specify a hight zoom level to get more precise renderings of lines and fonts. It's possible to use lines which are 0.25pt thick.

Using the new version the zoom level just makes the document bigger which results in the content being spread over a lot of pages. If I don't specify the zoom level then the thin lines are not appearing in the PDF.

What version of wkhtmltopdf was used?
New version:
https://github.com/npinchot/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-macosx-10.9.1-x86_64-0.12.1-b766b33.tar.xz

Old version:
wkhtmltopdf 0.10.0 rc2

How were the PDFs generated?

./wkhtmltopdf --zoom 100 'http://localhost/test.html' test.pdf

PDFs rendering without embedded fonts on OS X

Rendering a completely blank HTML file on OS X:

  • 0.12.1 generates a 4 KB file
  • 0.10.0 RC2 generates a 1 KB file

Pages with more HTML see a similar ratio:

  • 0.12.1 generates a 648 KB file
  • 0.10.0 RC2 generates a 111 KB file

OS X 10.8.5: No TOC is created.

The following command

./wkhtmltopdf toc test.html test.pdf

doesn't put a TOC in the output document. The HTML document is primitive, it contains nothing but h- and p-tags.

Tested with wkhtmltox-macosx-10.9.1-x86_64-0.12.1-development-593ac96.tar.xz from Sourceforge

all text are bolded when the pdf is generated on heroku (0.12.0)

Hello,

I'm using a custom font with three different weights in my PDF. (they are in three different files)
The page displays correctly in debug mode, but somehow the light weight font is not rendered correctly in my local (falls back to normal weight, and running wkhtmltopdf from the command line gives the same result). And when I test it on heroku, the html page still renders correctly but all the text are bolded when rendering as PDF. Any idea how to fix it?

(btw, I tried .otf, .ttf, and .woff fonts, all of them had the same problem)

screenshots:
image
HTML - Local environment: Mac OSx 10.9 (wkhtmltopdf 0.12.1rc)

image
PDF - Local environment: Mac OSx 10.9 (wkhtmltopdf 0.12.1rc)

image
HTML - Heroku, Linux amd64 (wkhtmltopdf 0.12.0)

image
PDF - Heroku, Linux amd64 (wkhtmltopdf 0.12.0)

Thanks,

segfault: ubuntu 10.04.4 - amd64

Older (0.10 & 0.11) builds and the current (0.12) one stopped working on ubuntu (10.04.4 server amd64) systems since the latest kernel update.

It seems wkhtmltopdf tries to read data inside /proc which causes a segfault due to chroot issues/restrictions. I'm currently trying to compile a new version for ubuntu 10.04.4 hoping that this might help.

Anyone experience the same problem?

SslHandshakeFailedError on https pages with https resources

Built from scratch on Ubuntu 13.10 using build_linux.sh linux-amd64. -V says wkhtmltopdf 0.12.1-6b4024b94c9253705ad94fa171489fb09a90db33 Compiled against wkhtmltopdf patched qt.

wkhtmltopdf https://www.google.com/images/srpr/logo11w.png foo.pdf

Works fine, output in foo.pdf is as expected. However,

wkhtmltopdf https://prospectlink.net/dripimg/Drippitt_lh.jpg foo.pdf
Loading pages (1/6)
Warning: Failed to load https://www.prospectlink.net/dripimg/Drippitt_lh.jpg (ignore)
Error: Failed loading page https://prospectlink.net/dripimg/Drippitt_lh.jpg (sometimes it will work just to ignore this error with --load-error-handling ignore)
Exit with code 1, due to unknown error.

is not the expected output. PDF generated is empty. Adding suggested flag does not change anything as far as I can tell. When I place that image in a single img tag and test, this is what I get:

wkhtmltopdf https://www.prospectlink.net/test.html foo.pdf
Loading pages (1/6)
Error: Failed loading page https://www.prospectlink.net/test.html (sometimes it will work just to ignore this error with --load-error-handling ignore)
Exit with code 1 due to network error: SslHandshakeFailedError

I am unable to determine if the SslHandshakeFailedError is a red herring or not. My Apache logs on the webserver side show the request for test.html but not for the jpg. Opening either the jpg or the test page in chrome loads without any certificate warnings, has green lock icon etc.

Feel free to test with the URLs above. I'll be happy to provide log output from the web server or run other tests as you suggest. Thanks for the help and for making a great piece of software!

TOC: CSS and umlaut problems

Create a TOC with the stylesheet from this gist: https://gist.github.com/mn4367/9069844.

In the resulting PDF the TOC layout is completely scrambled. Obviously the CSS in the styleshet seems to be a problem for rc12. In general there is nothing wrong with the embedded CSS since the previos versions rendered it correctly. I also did a check with Firefox and Safari (using xsltproc with this stylesheet and the outline.xml to create a HTML page) and both rendered it ok.

Another problem is that for example german umlaut characters aren't handled properly. To check, this gist can be used (with the stylesheet above and the built-in stylsheet): https://gist.github.com/mn4367/9068693.

The same is true for umlaut characters in the headers of the document itself. The document part renders correctly, but the corresponding entry in the TOC is wrong.

auto calculation of height for --header-html is broken

There's something very fishy going on with version 0.12.0 feature --header-html installed from wkhtmltox-win32_0.12.0-03c001d.exe. I tried many tests on Windows 7, but didn't a single output as expected - Nothing worked as expected. For example:

c:\wkhtmltopdf12\bin>wkhtmltopdf.exe test-red.html test-red.pdf && test-red.pdf
... Done --> Nice PDF

c:\wkhtmltopdf12\bin>wkhtmltopdf.exe --header-html test-green.html test-red.html test-combo.pdf && test-combo.pdf
...  Done --> All white PDF

c:\wkhtmltopdf12\bin>wkhtmltopdf.exe test-red.html --header-html test-green.html test-combo2.pdf && test-combo2.pdf
... Done --> All white PDF

Both test-green and test-red are similar (Green <-> Red).
<html> <head> <body style="background:Green;"> <p>TEST</p> </body> </html>

Also, it crashes quite often; for example this resulted in a crash.

c:\wkhtmltopdf12\bin>wkhtmltopdf.exe www.google.com --header-html test-green.html gg.pdf && gg.pdf
Loading pages (1/6)
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
[>                                                           ] Preparing

--> crash.

c:\wkhtmltopdf12\bin>wkhtmltopdf.exe --header-html test-green.html www.google.com gg.pdf && gg.pdf

--> Also crash, same output.

There were many different crashes and fail-outputs as well, all related to header-html, will add them here - should they become separate issues?

[OS X] bottom/right margins ignored in development build

./wkhtmltopdf -s A4 -T 30mm -R 30mm -L 30mm -B 30mm test.html test.pdf

This produces a PDF where the top and left margins are OK, but there are no margins at the right and bottom side. Moreover it seems that the area has a constant width of about 19 cm and is only moved right and down (by -T and -L). The lines of text aren't wrapped at the right side of the page. It looks like the parts of are rendered outside the visible part of the page (right and bottom).

This can be cured to some extent by setting the width of the body explicitly via CSS (lines are broken accordingly), but it has of course no effect on the bottom.

If I set the width of the to 16cm and the background-color to red, I still get a red rectangle which goes beyond the visible page area (checked with a PDF editor).

Checked with wkhtmltox-macosx-10.9.1-x86_64-0.12.1-development-593ac96.tar.xz from Sourceforge.

Can't build on OSX 10.9 mavericks

  1. Ran build_osx.sh
  2. Output:
Configuring QT
make: *** No rule to make target `confclean'.  Stop.

   The specified system/compiler is not supported:

      wkhtmltopdf/qt/mkspecs/unsupported/macx-clang-libc++

   Please see the README file for a complete list.

Is there a way to get a pre-built installer? Something you might be able to add to releases?

rendering issues for JPEG with XMP metadata

I found some old bugs related to this on the google project page but they were closed or left dormat. There is an issue with rendering some jpegs. it ends up making them gray, blown up, and interlaced.

I say some because if I run 'convert some.jpg some.png' and then reverse that process 'convert some.png some.jpg' the image renders properly.

I also opened an affected jpg into GIMP and resaved it but without any EXIF, Thumbnail, or XMP data, I've attached a screenshot of the settings I used.
screenshot from 2014-02-08 00 34 58

I've also attached a screenshot of the pdf rendering a jpg that has this issue, a jpg that I saved with GIMP and a jpg I converted to png and back via command line on linux. Top, left, Right respectively.
screenshot from 2014-02-08 00 36 06

For now I can easily just run the convert command on these images, but it does appear there is a bug somewhere.

I've also attached a jpg that has this issue. Hopefully the upload process does not strip something off the image that lets it work on your end.
logo

EDIT: I'm using 0.12.0 on Ubuntu 12.04. let me know if you need any more info.
Something I noticed in GIMP, is that the checkbox is always on for XMP data when resaving a jpeg that does not render properly, but is disabled on jpegs that render properly.
To test that theory, I ONLY unchecked XMP data when resaving a troubled jpeg, and it now renders properly.

How to install on Federoa Linux

Hi guys,

I downloaded the latest release (0.12.0_rc1) and untarred it, but I'm not clear on what's required to make it run in Fedora Linux. I'm not seeing a build script. Please help if you can.

Use tar.gz instead of tar.xz

I Assume that 98% of every one who download your packages will fail to unpack the binaries. Why dont just simply use a standard like tar.gz?

PDF Generation Ihis ssue

Hello Sir,
I am generating pdf from my java application with jboss as app-server on redhat 5.9 os.
My pdf generation gets stop after some times when it gets idle. To resolve this issue I had restart jboss every time once it gets idle. I don`t want to restart jboss every time.

Please provide some permanent solution to my problem.
Thanks,
Nitesh Kumar

Pdf.js

Hi,
Not sure that you could do anything but there's an issue when I use pdf.js to open some PDFs created with wkhtmltopdf : if you copy and paste the textcontent of the PDF, each character is separated by a line break.

Cf. mozilla/pdf.js#2569

Is there anything you can do on your own ? Thank you.

QSslSocket: cannot resolve SSLv2_client_method

Runnign binary wkhtmltopdf under Ubuntu Server 12.04 resuts in "QSslSocket: cannot resolve SSLv2_client_method"

Package required is libssl0.9.8, please add this information INSTALL.md

overlapping text when repeating headers/footers in table

When having a big table with lots of rows, or many tables with 10-20 rows, sometimes the feature that repeats the thead/tfoot when there is a page break causes weird results.

Like a tfoot is moved to page one, and is displayed above some other text.

Can this feature be turned off?

th tags with background images don't display properly.

I had no problems with 0.10 or 0.11, but with 0.12 or 0.12.1 th tags with background images don't display the image portion properly.

If I use a linear gradient, the gradient portion is ignored. This will simply display the gray background color:
th{background:#dcdce6;background:linear-gradient(to bottom,rgba(245,245,255,1) 0%,rgba(245,245,255,1) 15%,rgba(210,210,230,1) 100%);color:#00592d}

If I use a sprite background image, it gets ugly and apparently the center of the image is used, not just the portion of the image selected. This code gets me a blue background, even tho it should be a white to gray gradient:
th{background:#e7e7e7 url('horz-gradients_2013.png') 0 0 repeat-x;color:#36}

The issue can be seen here with 0.12 on the left and 0.10 on the right (which isn't perfect either):

image

Here's that gradient image:
horz-gradients_2013

If this isn't reproducible, I can create a test page.

[OS X] specifying the page width/height has no effect in development build

./wkhtmltopdf --page-width 150mm --page-height 150mm test.html test.pdf

Without using --page-width and --page-height my test document has 3 pages. Using the command above results in a document with the correct dimensions but now 802 pages. Per page there are only one or two words rendered.

page-dimensions

Checked with wkhtmltox-macosx-10.9.1-x86_64-0.12.1-development-593ac96.tar.xz from Sourceforge.

crash when CSS widows are specified

Using wkhtmltopdf 0.12.0 (amd64)

For a print.css containing:
body {
widows: 2;
orphans: 2;
}

The following html generates a segmentation fault:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">  <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />        <link type="text/css" rel="stylesheet" href="print.css" />      </head>  <body           <div id="node-7" class="section-1"></div>  <div id="node-123" class="section-3 nobreak">  <p><img src="_DIK1009a.jpg" alt="Orientation" width="200" height="148" style="float: left; margin: 5px;" class="picture" /></p>  </div>          
  </body></html>

I don't believe the actual img src matters, but here it is:
_dik1009a

specifying charset in Content-Type header causes CSS to be ignored

I have a web page loading CSS externaly from a LESS endpoint, which, when compiled into CSS dynamically, specify the following header:
Content-Type: text/css; charset=utf-8

When I render it using wkhtmltopdf, the CSS is ignored.

If I precompile my file, the response header becomes
Content-Type: text/css
and the file renders correctly.

I will try to contribute this fix soon.

bad kerning for fonts in output PDF

This is the old Issue #72 from Google Code, first reported in 2009. It still occurs with the dev branch of 0.12.0, tested with commit d6541fe .

What steps will reproduce the problem?

  1. Generate PDF from any HTML input with wkhtmltopdf via e.g.

    ./wkhtmltopdf test.html test.pdf
    
  2. View it. Tested with Evince, Xpdf and Chrome's built-in PDF reader with similar results.

What is the expected output? What do you see instead?
Expected: A PDF rendering similar to the one seen of the HTML document in a browser, specifically concerning the letter-spacing.

Result: The kerning is way off. Sometimes too expanded, sometimes too condensed. See attached sample rendering of (from left to right):

  1. an HTML document rendered by a browser (Chrome)
  2. the resulting PDF rendered by Chrome's built-in PDF reader
  3. the resulting PDF rendered by Evince

What version of the product are you using? On what operating system?
Dev branch of 0.12.0, tested with commit d6541fe . Debian Sid, i386. Using the binary that resulted after building the Git revision with:

./build_linux.sh linux-i386

I have tested earlier versions of Wkhtmlpdf on Fedora (amd64) with identical results.

Please provide any additional information below.
I include the sample document and rendering below, but it happens with everything I throw to Wkhtmltopdf, so I don't think there are any specific "clues" in the minimal HTML code.

Problem over generating PDF based on HTML contains image tags with base64 strings

Version of wkhtmltopdf : 0.10.0 rc2

Description about the problem:
Actually, I'm providing CK Editor option to my users to add their description. Here, we go. We can expect all the users to enter or type the content on their own. Sometimes, users will copy the image from some other web-sources directly and will paste it in CK Editors.

On doing so, we would get those base64 image strings in our editor content. Whenever I try to generate PDF for such contents, I'm getting error.

How can I resolve this problem? Please let me know your comments.

flexbox layout doesn't work

Flexbox seems to be broken in wkhtmltopdf.

Here's a test case, which renders correctly in current versions of Chrome, Firefox, and Internet Explorer. wkhtmltopdf renders it as if the flex properties were not present.

Tested with the 0.12 Windows 32-bit download as found on http://wkhtmltopdf.org/ (wkhtmltox-win32_0.12.0-03c001d.exe). As you can see I tried using the -webkit- prefixes and they didn't help.

<!DOCTYPE html>
<html><head><title>Flexbox test</title>
<style>
body {
  width: 800px;
  border: 2px solid green;
}
.flexrow {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  display: -webkit-flex;
  -webkit-flex-direction: row;
  -webkit-justify-content: space-between;
}
.flexrow > div {
  background-color: yellow;
  border: 1px dashed black;
}
</style>
</head>
<body>
  <div class="flexrow">
    <div>This is<br>item 1</div>
    <div>This is<br>item 2</div>
    <div>This is<br>item 3</div>
    <div>This is<br>item 4</div>
    <div>This is<br>item 5</div>
  </div>
</body>
</html>

No backlinks to TOC are created.

In previous versions wkhtmltopdf --enable-toc-back-links created links from the section headers back to the TOC, e. g. clicking in the PDF on a header (

,

, ...) went back to the corresponding entry in the TOC. This no longer works.

Checked with wkhtmltox-win64_0.12.1-development-773cad3.exe from Sourceforge.

content-type missing in HTTP POST

If a try to send a post value this error occurs:

content-type missing in HTTP POST, defaulting to application/x-www-form-urlencoded. Use QNetworkRequest::setHeader() to fix this problem. Exit with code 1 due to http error: 1203

I used wkhtmltopdf 0.12 on Linux 64bit:
wkhtmltopdf --post 'pdf' 'true' http://...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.