wkhtmltopdf option 'disable-smart-shrinking' doesn't work
Asked Answered
C

1

6

What steps will reproduce the problem? 1. wkhtmltopdf.exe --disable-smart-shrinking --print-media-type --page-size A4 --dpi 96 --margin-top 25 --margin-bottom 25 file:///.../debug.html mytest.pdf

What is the expected output? I expect to see the non-shrinked content in result pdf-file

What do you see instead? Shrinked content in the result pdf-file

What version of wkhtmltopdf are you using? 0.11.0 rc2

On what operating system? Windows 7 64-bit

The problem is a little bit wider. I need to insert page breaks before some divs depending on their height. I wrote the appropriate script. But the thing is in "shrinked world" the coordinates analyzed by the script change and it the result is ugly. So I need to disable shrinking to make it work correctly.

On the other hand the documentation says '--disable-smart-shrinking' is "only available using patched QT". Does my version of 'wkhtmltopdf' implement this stuff? How can I find it out? Should I install QT or even rebuild the wkhtmltopdf?

Candytuft answered 23/8, 2013 at 9:58 Comment(2)
is this still a question? with "wkhtmltopdf 0.12.0 final" windows7 64 i solved it (probably ;-)Eirena
Did you ever find a solution to this?Clavicorn
A
1

As you pointed out "--disable-smart-shrinking is only available using patched QT."

To know which version of wkhtmltopdf you are using, open a terminal and run:

wkhtmltopdf -V

It should tell you whether you're using the patched version or not. For example:

wkhtmltopdf 0.12.6.1 (with patched qt)

If your version doesn't have the patched qt remove it and get the appropriate version for your system on https://wkhtmltopdf.org/downloads.html

Arette answered 21/9, 2023 at 10:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.