Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page break does not work #123

Open
RandieM opened this issue Oct 4, 2021 · 2 comments
Open

Page break does not work #123

RandieM opened this issue Oct 4, 2021 · 2 comments

Comments

@RandieM
Copy link

RandieM commented Oct 4, 2021

I am trying to render a PDF with a page break at a specific point in the HTML. I am using wicked_pdf (2.1.0) and wkhtmltopdf-binary (0.12.6.5) and the suggested CSS classes from wicked_pdf's documentation.

I believe that the problem is not related to wicked_pdf, because the page break is respected when I use the binary installed directly on my computer and not the one that comes from the wkhtmltopdf_binary gem. Strangely though, the version of wkhtmltopdf installed on my computer is the same as the one provided by the gem.

My set-up: Fedora 34 x86_64, Ruby 3.0.2 (rbenv)

Any ideas?

@unixmonkey
Copy link
Collaborator

Could you please post the results of running wkhtmltopdf --version for both the system binary and the one from this project?

One difference I could see is that system binaries often are compiled without QT support, which is necessary for many PDF abilities. Another is that the binaries distributed here sometimes need libraries to be installed on the host system, like libjpeg etc. These may not be present on your current system.

@RandieM
Copy link
Author

RandieM commented Oct 5, 2021

@unixmonkey, thanks a lot for getting back to me. Below is the output of the command for both the gem and system wkhtmltopdf.

Gem wkhtmltopdf-binary:

wkhtmltopdf --version
wkhtmltopdf 0.12.6 (with patched qt)

System wkhtmltopdf:

/usr/bin/wkhtmltopdf --version
wkhtmltopdf 0.12.6

I didn't manage to find an official guide (may be I missed it) with the dependencies, but I have the following installed and latest version for my OS: libjpeg-turbo zlib fontconfig freetype libX11 qt

Just to make sure I was clear earlier, page break works when specifying the system wkhtmltopdf, but does not work with the gem-provided binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants