Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ Library to Convert HTML to PDF? [closed]

Tags:

c++

html

pdf

I am looking for a C/C++ library to convert HTML (Actually XHTML + CSS) documents to PDF.

It is for commercial use and source would be nice but not essential.

Anybody have any recommendations or experience doing this?

UPDATE: To clarify, I am targeting the Windows platform only. I am developing with Borland C++ Builder 2006, but the library does not have to be a VCL component.

Many thanks in advance.

Steve.

like image 287
QAZ Avatar asked Nov 05 '22 22:11

QAZ


2 Answers

To do that I have successfully used wkhtmltopdf. Uses webkit and can be called from command line or as a static library. It's great and simply to use.

wkhtmltopdf website

OpensSource (LGPL) and free!

Hope it can help

like image 106
Albertino80 Avatar answered Nov 12 '22 21:11

Albertino80


Wouuld CLI applications do? If memory fails me not, GNU Ghostscript had utilities html2ps and ps2pdf. Source should be available too.

like image 32
Vilx- Avatar answered Nov 12 '22 22:11

Vilx-