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
1 answer

Enforce charset for decoding html in QT webkit

I use qt web kit api to convert html files to pdf. The problem that I am facing is of character corruption of south east asian characters. Right now I am manually setting the character set for the html files in following way: QWebSettings…
Ashish Sharma
  • 1,124
  • 2
  • 24
  • 49
0
votes
0 answers

Unable to Install Wkhtmltopdf on my Cpanel-Godaddy Shared Hosting

I have a shared hosting plan with GoDaddy without root access. I am trying to install Wkhtmltopdf. I have tried the following steps but because I don't have the root access I a unalbe to complete the operation- $ wget…
0
votes
1 answer

wicked_pdf in Rails cannot read local temp files when rendering pdf from string in docker

I'm using the wicked_pdf gem to render a pdf from an html template in Rails. While on localhost it works on the production environment (a docker image running in AWS ECS via Fargate) the export endpoint returns an error. The error is caused by the…
Fabrizio Mele
  • 229
  • 2
  • 15
0
votes
0 answers

How to use wkhtmltopdf (docker) in spring boot application

For some reasons, I couldn't install wkhtmltopdf directly on my system, I am trying to install an wkhtmltopdf docker instead, I have tried Surnet/docker-wkhtmltopdf. I also writing an API in spring boot to convert html to pdf file. Whenever I need…
pxq
  • 11
  • 2
0
votes
0 answers

HostNotFoundError : wkhtmltopdf reported an error

I ran into an error when where I don't have internet connection to the outside and the mobsf is hosted remotely using a domain name, what could be the issues based on the error below? Traceback (most recent call last): File…
A O
  • 1
  • 3
0
votes
0 answers

Creating background-image in html to pdf conversion

I will convert my html page to pdf format with dinktopdf and get the a4 output from the printer. I'm converting html content to string, but backgorund-image are not show in display. how can I do that?
nikki
  • 25
  • 5
0
votes
1 answer

Is there a way to pass an html string as command line argument to wkhtmltopdf.exe?

I am creating an Azure function to run wkhtmltopdf.exe within that to convert an html string to pdf and am needing to pass the html string to the .exe. Is there any way to achieve this? thanks Angelo
Angelo
  • 35
  • 6
0
votes
0 answers

I can't to generate a PDF file with Python and wkhtmltopdf

I hope that y'all fine, I'm developing an app in Python that one of its functions is to generate a PDF file, but when I try to do it, it raise this exception: File "D:\Projects\CORE\venv\Lib\site-packages\pdfkit\pdfkit.py", line 158, in…
0
votes
0 answers

laravel-vue-spa: using laravel-snappy : how to properly view/stream the pdf

my controller public function test(Request $request) { $per_day = Payment::per_day(Request::input('start'),Request::input('end')); $per_day = $per_day[0]; $cash = $per_day->cash; $gcash = $per_day->gcash; …
0
votes
0 answers

Stream() is not working, gets downloaded automatically

Actually I am trying to stream pdf file in browser by using laravel snappy pdf. But it gets download all time. $pdf = \PDF::loadView('sale::print-pos', [ 'sale' => $sale, ]) ->setPaper('a7') ->setOption('margin-top', 8) …
0
votes
1 answer

Issue in HTML to PDF generation in laravel in Gujarati

I have used wkhtmltopdf and barryvdh/laravel-snappy package in laravel version 10 for generate pdf reports and report is in Gujarati Shruti language. Issue is report works fine in local system but when we upload it on server it’s not displayed. We…
0
votes
0 answers

Problem generating pdf on AWS using wkhtmltox-0.12.6-4.amazonlinux2_lambda

I am generating a pdf in aws from an html string using wkhtmltox-0.12.6-4.amazonlinux2_lambda.zip and the wkhtmltopdf installer. I have configured in serverless the layers and the function. The html code has integrated CSS styles in the tags.…
0
votes
0 answers

Python - Writing PDF with href links using relative path to local file

I am producing PDF using wkhtmltopdf with references to files in a folder located at the same level as the PDF: - PDF - AttachmentFolder / Attachment 1.extension1 - AttachmentFolder / Attachment 2.extension1 etc. These links works in 99% of my…
user1965728
  • 91
  • 2
  • 7
0
votes
0 answers

Dash dashboard to PDF: 'loading...' issue

Good day I've wrote this code in python to convert any website into an PDF: import pdfkit # Define Path of wkhtmltopdf.exe pathToWkhtmltopdf = r'C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe' # Point pdfkit configuration to…
0
votes
1 answer

Streamlit deployment dependency issues

I am trying to deploy a python project I have created using Streamlit, I have several packages that only require a pip install including pdfkit. All of my packages are working correctly and I currently have them all in a requirements.txt file.…