A slim PHP wrapper around wkhtmltopdf with an easy to use and clean OOP interface
Questions tagged [phpwkhtmltopdf]
41 questions
6
votes
3 answers
wkhtmltopdf with php:8-fpm-alpine
I have an existing php:8-fpm-alpine Dockerfile, and i need to add WKHTMLTOPDF package. Is that even possible. I tried using following dockerfile, but i get following error log:
Dockerfile...
FROM php:8-fpm-alpine
...
RUN apk add xvfb libfontconfig…

one2three4
- 83
- 2
- 8
6
votes
9 answers
Wkhtmltopdf does not render Chart.JS 2.5.0 graph
Using:
WKpdftohml version 0.12.3.2
PHPwkhtmltopdf version 2.2.0
Chart.JS version 2.5.0
I'm trying to print a line graph using the above libraries. I can reproduce a pdf using the shell command: wkhtmltopdf --javascript-delay 5000 "…

Luís Alves
- 463
- 1
- 5
- 20
5
votes
3 answers
wkhtmltopdf Default Settings?
I am using laravel-snappy
as a wrapper for wkhtmltopdf for creating PDFs out of HTML.
While running the same code with the same configuration, I am getting different outputs:
CentOS output: (centered correctly but with big margin at the…

Broshi
- 3,334
- 5
- 37
- 52
4
votes
0 answers
Full bleed column with bottom padding with wkhtmltopdf
I'm converting a HTML page with wkhtmltopdf from HTML to PDF. My page consists of a left column with full bleed background color. How can I force a bottom/top padding so that my content is not pushed against the edge of the page (as demonstrated…

bart
- 14,958
- 21
- 75
- 105
3
votes
0 answers
wkhtmltopdf equivalent of flex with -webkit-box
I'm having hard times with wkhtmltopdf.
I use the binary version 0.12.
my html version is like this
// container

Jean-Pierre TR
- 55
- 5
3
votes
1 answer
wkhtmltopdf scales down css dimensions
I'm experiencing a similar issue that this one with the latest update of the knp Snappy Bundle on Symfony 4.4.5.
I've set the following options and they do not help to fix the error.
options:
- { name: 'no-outline', value: true }
- { name:…

Sam
- 243
- 5
- 16
3
votes
1 answer
wkhtmltopdf not converting quotes and spaces properly
I am using this wkhtmltopdf 0.12.3 (with patched qt) version of wkhtmltopdf.
With Montserrat font-family.
The HTML is like this,
This Agreement for home staging and rental of furniture and accessories
(“Agreement”) is entered…

Keyur
- 1,113
- 1
- 23
- 42
2
votes
0 answers
wkhtmltopdf Tool - Texts/Fonts are cutting at the end of the page with wkhtmltopdf latest version 0.12.6 (with patched qt)
We need solution using wkhtmltopdf tool only as per our reqirement. We do not need to use any other tool to convert.
We are generating pdf file with wkhtmltopdf tool, and we are using latest version 0.12.6 (with patched qt). But generated pdf…

Chirag Shah
- 353
- 1
- 13
2
votes
0 answers
wkhtmltopdf - html to pdf remove left and bottom white space
I am trying to generate a PDF from HTML, everything is working fine except there is a white space at bottom-left of the generated PDF.
I am using wkhtmltopdf library.
Here is my code :
$globaloptions = array(
'page-size' => 'A4',
…

Nahid Naim
- 21
- 2
2
votes
0 answers
wkhtmltopdf: why can not header & footer display in one pdf?
i use "knp_snappy.pdf" with php to create the pdf file.
$template = $this->renderView('DemoProductBundle:pdf:template.html.twig', array('productData' => $productData));
$headerTemplate =…

Tom
- 21
- 2
2
votes
1 answer
Using wkhtmltopdf to output Google Charts to PDF
We have a Silverstripe project that uses the silverstripe-wkhtmltopdf module to output HTML/CSS/Javascript as PDF.
Simple Javascript like document.write works but I want to output Google Charts using their visualisation API: