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
1
vote
2 answers

RuntimeError (Location of wkhtmltopdf unknown)

I am trying to use pdf generator in my rails 2.3app. It is working fine in my local machine and pdf is generating. In my production server (nginix) it is not working and shows the error: "wkhtmltopdf RuntimeError (Location of wkhtmltopdf…
rubyist
  • 3,074
  • 8
  • 37
  • 69
1
vote
0 answers

wkhtmltopdf and JQuery flot render PDF error

I'm using JQuery Flot for render one or more chart. So, when i try to use wkhtmltopdf for render chart to PDF, it only render the graph's axis and graph's background is black color. My Enviroment: + Windows Server 2003 standard edition SP2 +…
1
vote
2 answers

Append new page to document without page break using wkhtmltopdf

I am combining the contents of multiple html files to produce a single PDF using wkhtmltopdf e.g. wkhtmltopdf page1.html page2.html page3.html output.pdf The generated PDF starts a new page after each of the html pages that I add. I want to be…
daveywc
  • 3,136
  • 7
  • 45
  • 58
1
vote
2 answers

how convert html string to pdf using c#

i have a string variable with html code and need convert to pdf the code of the variable, the variable is filled with the data of one gridview
Name Cuty Other…
miguelSnam
  • 73
  • 2
  • 9
1
vote
0 answers

PHP shell_exec 'wkhtmltopdf' returns null even though successful completion

In the docs for PHP shell_exec it says that that shell_exec function will return null if an error occurs. Unfortunately when I run the following code, the code all completes correctly, but the shell_exec command still returns null. // convert to…
jeffery_the_wind
  • 17,048
  • 34
  • 98
  • 160
1
vote
3 answers

How to create pdf of html webpage using php predefined function pdf

i have a user defined function which return me html content . so i just wanna print this html in PDF file and downloaded directly as PDF thanks in advance....
Lucky W
  • 50
  • 1
  • 7
1
vote
1 answer

Add Crop Marks to PDF with wkhtmltopdf

I'm trying to create a pdf file of user designed HTML that will then be send to a printing house for print and delivery. The printing house wish me to add crop marks on the .pdf. I'm currently doing this with CSS by placing position: absolute;…
Marcus Lind
  • 10,374
  • 7
  • 58
  • 112
1
vote
0 answers

PHP tcpdf shrink print multiple pages in one

I have been looking for a solution but can't find anything works right off the bat. The objective is to make a hand-out style page out of a multi-page PDF document. Just like we can choose 6-up in most printer driver options. Illustration: The…
Reed
  • 1,628
  • 3
  • 21
  • 29
1
vote
1 answer

Encoding pdf in utf-8 with wkhtmltopdf in Java

I've had GWT, ext-GWT web-project in utf-8 charset. I've also add utf-8 charset in html file. Additionally I need to create some pdf report. So that I wrote a special servlet, which take a template html-file, add some information (in local…
Kaha
  • 171
  • 4
  • 14
1
vote
1 answer

Highcharts rendered with no strokes using wkhtmltopdf

I have an issue with generating PDF using wkhtmltopdf. It's very similar to the case described here, except first few charts are rendered fine, but after page break, each next is rendered without strokes - no axis, no ticks, no legend borders,…
El Kopyto
  • 1,157
  • 3
  • 18
  • 33
1
vote
0 answers

Image error when convert HTML to PDF in c#

I'm using 'wnvhtmltopdf' to convert HTML file to PDF. but Im facing a problem that the imags in the html file doesn't appear in the in the PDF file. any idea to resolve the problem ? if we think out of the box, is there another idea to make to…
Raed Alsaleh
  • 1,581
  • 9
  • 27
  • 50
1
vote
1 answer

yii html2pdf keep css formatting

I am trying to create a PDF file using html2pdf. I have followed this guide. I can create it in html fine and everything is in printable area however the created PDF does not display same results. the table width are not kept. Data is cut off at end…
shorif2000
  • 2,582
  • 12
  • 65
  • 137
1
vote
1 answer

Cannot response a pdf file in circus

I have done to implement a print pdf function. I use pyramid, wkhtmltopdf and jinja2 to generate pdf. It works fine in gunicorn. However, when I deploy it to production (I use circusd to run in production), the function fails without any error…
Thinh Phan
  • 655
  • 1
  • 14
  • 27
1
vote
1 answer

wkhtmltopdf - better cyrillic font rendering?

I'm trying to get better looking Cyrillic output with wkhtmltopdf. Any suggestions on how I can make the wkhtmltopdf output look more like how it looks in Chrome? In particular, I'd like to get the serifs and the fine detail that the Chrome…
ErikR
  • 51,541
  • 9
  • 73
  • 124
1
vote
1 answer

wkhtmltopdf - Even number of pages as output

I'm looking for a way to make sure that the output from wkhtmltopdf always consists of an even number of pages, i.e. adding a blank page at the end of the pdf if the number of pages is uneven. If anyone has a good solutions for this I would be…
myterist
  • 11
  • 2