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

Symfony2 - Generate PDF with KNP Snappy from controller gives 404

I am using KNP Snappy with Symfony2. When I use a response from a controller I get the following response: The exit status code '2' says something went wrong: stderr: "Loading pages (1/6) [> ] 0% [======> ] 10% [============================> ]…
xfscrypt
  • 16
  • 5
  • 28
  • 59
1
vote
3 answers

html to pdf conversion in laravel 4

I am using laravel 4 and having problem with html to pdf conversion. I have a method download, when this method is called based upon the parameter passed i call some other methods(e.g download1() method). This method(download1() method) returns the…
Nikhil Agrawal
  • 285
  • 1
  • 3
  • 12
1
vote
1 answer

Python - Return a PDF to the browser

I have to work with a fairly basic Python 2.6 on a 'black box' appliance (so no Django or non-standard libraries). I have to: Send a bunch of html from the browser to the Python script on the server Do some processing and convert to pdf using…
PerryW
  • 1,426
  • 1
  • 15
  • 25
1
vote
1 answer

HTML to PDF conversion using WkHtmlToXSharp Caching / Buffering Issue

I want to convert an HTML file to PDF file, and I was using "wkhtmltopdf.exe". Then we moved this application to a shared hosting server. This server, wouldn't allow to run .exe files, so that I have to use the WkHtmlToXSharp.dll [wrapper for the…
Derin
  • 1,202
  • 1
  • 15
  • 25
1
vote
1 answer

why is subprocess.call() not running command as anticipated?

bit of a niche scenario here, and to test directly you'll need wkhtmltopdf (in this case listening to port 7000 w/ --read-args-from-stdin) up and running as a daemon (and a handy html file on hand.) if I do: echo "-s letter -T 24mm -R 24mm -B 0mm -g…
1
vote
0 answers

Bin archieve not found while generating PDF with WkHtkmToPdf. Any idea why?

I'm trying to generate a PDF from a previous formed HTML, stored temporarilly in a file, with WkHtmlToPdf. $pdf = new WkHtmlToPdf(array('bin' => $this->getVendorsPath() . 'h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64')); $html =…
Dennis Braga
  • 1,448
  • 3
  • 20
  • 40
1
vote
1 answer

Generating PDF using wkhtmltopdf - copy and paste generated table to word fails

I have an ASP.net application that uses wkhtmltopdf to generate a PDF file from HTML input. It works beautifully and everything, including HTML tables, displays perfectly in the PDF file. The issue is that the recipients of the file need to copy…
1
vote
1 answer

wkhtmltopdf and PDF/A-1b

I use this software in a .Net project, to convert HTML in PDF. It work's great for me. I want to produce files PDF in the format PDF/A-1b. There's a way to accomplish this task? Thank's in advance.
treep
  • 37
  • 2
  • 10
1
vote
1 answer

WKHTMLTOPDF with PHP not accepting args for page size?

I'm using WKHTMLTOPDF for a client. My PHP is quite rough... The problem is, my arguments aren't working, and in the below example they could be wrong, but none are working... such as zoom, page-size, etc. So for example, in the switch statement,…
user1447679
  • 3,076
  • 7
  • 32
  • 69
1
vote
0 answers

wkhtmltopdf adds extra spacing when multiple width, height : 100% elements

I'm using wkhtmltopdf via subprocess to generate PDFs in a python flask web app. It works great for most html input I give, but applies some very weird formatting in certain cases. For some cases, I need to append the html block together 5 times. In…
1
vote
2 answers

How to create a threadsafe c# exe wrapper

I am attempting to convert HTML to PDF. I have checked out PDFSharp and ITextSharp which both don't look too complicated, but there is an executable out there wkhtmltopdf which seems to by far have the best reviews. I would like to use the…
SamuelKDavis
  • 1,033
  • 1
  • 7
  • 14
1
vote
1 answer

proc_close has an exit code of 2 on windows server

I've been using php wkhtmltopdf and noticed that when using the proc_close function on windows, it returns a value of 2. I've looked for what this exit code means and I can't seem to spot a reference to it. The two codes for proc_close seem to be 0…
r1901156
  • 123
  • 2
  • 2
  • 8
1
vote
0 answers

css not called in wkhtmltopdf 64 bit -v 0.9.6

I am using wkhtmltopdf v0.9.6, 32-bit static binary with pdfkit. It works as expected (without header, footer, etc). The server has a 64-bit OS, so the PDF file appears with a header and footer. I want to remove the header and footer. I have tried…
Anish Shah
  • 333
  • 1
  • 14
1
vote
0 answers

OSX, PDFkit & wkhtmltopdf hangs in dock

Summarize what is going on: OSX: 10.8.4, wkhtmltopdf: 0.9.1 (via gem wkhtmltopdf-binary), pdfkit: 0.5.4 When submitting a link over with the pdf format, the dock displays a terminal icon for wkhtmltopdf and rails server hangs. Generally clicking the…
1
vote
0 answers

wkhtmltopdf installation on cent os server

I'm trying to install wkhtmltopdf on CentOS 64-bit box. I did the following: $ wget {relavant url to binary from link above} $ tar -xvf {filename of above wget'd file} $ ./wkhtmltopdf-amd64 http://www.google.com example.pdf And i got: error while…
sash
  • 85
  • 2
  • 10