Questions tagged [wkhtmltopdf]

A shell utility to convert HTML to PDF using the Webkit rendering engine and Qt.

Tool for converting web pages to PDF documents using the WebKit engine. These run entirely "headless" and do not require a display or display service.

Document objects:

wkhtmltopdf is able to put several objects into the output file, an object is either a single webpage, a cover webpage or a table of content. The objects are put into the output document in the order they are specified on the command line, options can be specified on a per object basis or in the global options area. Options from the Global Options section can only be placed in the global options area

A page objects puts the content of a singe webpage into the output document.

(page)? <input url/file name> [PAGE OPTION]...

Options for the page object can be placed in the global options and the page options areas. The applicable options can be found in the Page Options and Headers And Footer Options sections.

A cover objects puts the content of a singe webpage into the output document, the page does not appear in the table of content, and does not have headers and footers.

cover <input url/file name> [PAGE OPTION]...

All options that can be specified for a page object can also be specified for a cover.

Resources:

2447 questions
0
votes
0 answers

CSS support in Wkhtmltopdf, PDFkit

Python-PDFKit is an adaption of the Ruby PDFKit library. It uses the wkhtmltopdf library for the HTML-to-PDF conversion. Unfortunately, wkhtmltopdf is based on an ancient version of WebKit and lacks support for many modern CSS and JavaScript…
0
votes
1 answer

converting HTML to PDF using wkhtmltopdf, python, django

I have a large html file. I am facing issue when I am converting HTML to PDF file CSS is not supporting. I used CSS all the way like inline, internal and external. When I use CSS like this it working fine:
0
votes
0 answers

Styles not getting applied toddams/RazorLight razor engine html to PDF conversion

Used toddams/RazorLight razor engine saved web pages and converted tp pdf, used .schtml file conversion, converted webpage as string for html to pdf conversion but styles do not get applied when converted to pdf.
007ruwan
  • 89
  • 5
0
votes
0 answers

Symfony 6.3.1, KNPLABS Snappy HTMLTOPDF error on generate(), code 87

My PDF files won't generate from my twig template. I'm using Knplabs Snappy in 1.4.2, wkhtmltopdf in 0.12.6 which it's binary folder is already established in environment variables. I'm on symfony 6.3.1 with PHP 8.1 I have an error that occurred…
0
votes
1 answer

How to include pictures using pdfkit?

I want to convert a web page to a PDF using pdfkit (which is using wkhtmltopdf), however I have troubles to also get the pictures from the web page. This is my code: import pdfkit config = pdfkit.configuration(wkhtmltopdf='C:/Program…
0
votes
2 answers

converting HTML to PDF using wkhtmltopdf Python

I am converting HTML to PDF. PDF downloaded success but it return blank pdf pages not showing any converted content. in my HTML file have Shopify CSS links. if convert minimum content HTML file then it converted correctly from django.shortcuts…
0
votes
0 answers

wkhtmltopdf renders blank page when Vue is used

When I make a new Vue project and use wkhtmltopdf, it renders a blank PDF page. Steps to reproduce: vue create hello-world Choose: Default (Vue 3, babel, eslint) npm run serve Check in browser that it works: http://localhost:8081 ./wkhtmltopdf…
Jorr.it
  • 1,222
  • 1
  • 14
  • 25
0
votes
0 answers

Qt uses the API function provided by the wkhtmltopdf library, and calling the "wkhtmltopdf_convert()" function will cause the application to exit

Qt uses the API function provided by the wkhtmltopdf library. When calling the "wkhtmltopdf_convert()" function, it will cause my originally running application to exit (the exit code is 0), which causes the program to automatically exit every time…
0
votes
1 answer

Nreco taking varying lengths of time to generate the same PDF

We have a system in place where we're using NReco.PdfGenerator (version 1.2.0 in .NET 4.8) to generate letters to send to customers. We've got dozens that we're sending a day and we're having trouble with the performance to get things in…
Matt James
  • 109
  • 2
  • 8
0
votes
1 answer

WkHtmlToPdfDotNet not working properly after first run

I am converting the string html data to pdf with the code block below, it completes the pdf conversion process perfectly in the first run, but it deletes the html tags in subsequent conversions. using (var converter = new…
M.Merth
  • 13
  • 5
0
votes
0 answers

How to avoid losing borders when table td content is too long?

I encountered a very tricky problem. In the. Net core project, I used wkhtmltopdf to convert HTML into PDF. However, when the content in td in the page table was too long, the top and bottom borders of the generated PDF file table disappeared. I…
0
votes
0 answers

Why does Python Pdfkit's from_string method insert a blank first page into the pdf?

I'm currently attempting to render a pdf from a series of html files with Python pdfkit and PyPDF2. My goal is to render each html file into a single page with pdfkit before stitching them together with PyPDF2's PdfMerger class. However, each time I…
0
votes
1 answer

How to Convert Local HTML Files to PDF Including CSS and Javascript

I currently have a project where HTML code is dynamically generated from spreadsheets, this code is then converted to PDFs. I need to keep the CSS and Javascript formatting (such as Bootstrap) when I convert the file and also maintain hyperlinks. I…
futium
  • 90
  • 1
  • 9
0
votes
0 answers

Python pdfkit css styling issues

I'm trying to a generate a PDF document from HTML template. Whenever I try to create a 3*3 layout, the CSS styling get messed up in PDF but in browser it works fine. Do I have to change anything pdfkit to make it work. Somehow I have managed to…
Sins97
  • 155
  • 1
  • 7
0
votes
0 answers

Wicked PDF Styling Issue on Tables

I am currently encountering an issue with the formatting of a table in a PDF document, generated using Wicked PDF in a Rails application, and am seeking assistance in resolving this issue. The requirement is to make the table fill the remaining…
1 2 3
99
100