Convert HTML to PDF

530 views
Skip to first unread message

thierry...@gmail.com

unread,
May 16, 2014, 6:30:58 AM5/16/14
to cefp...@googlegroups.com
Hi,

I've heard Chromium is able to save HTML pages to PDF format. I have an HTML report storing some text, tables, images and links to other pages containing also text, images and links to other pages. Is there a way to convert this report to a single PDF ?

Regards,

Thierry BRIZZI.

Czarek Tomczak

unread,
May 16, 2014, 6:52:54 AM5/16/14
to cefp...@googlegroups.com
Chrome uses PDF plugin for printing to convert html to pdf. Unfortunately this plugin is not open source, it contains third party non-free code.

You can use an online service like pdfcrowd.com, the Chrome extension uses it:

A javascript based solution, jsPDF:

A python based solution, xhtml2pdf:

thierry...@gmail.com

unread,
May 16, 2014, 8:17:52 AM5/16/14
to cefp...@googlegroups.com
Thank you for your answer.

In fact, I'm using the "ebook-convert" command line tool packaged with Calibre (-> http://calibre-ebook.com). This tool is far better than xhtml2pdf or other HTML to PDF converters I've tested. So it is difficult to replace it with another but if the Chromium project package this kind of feature it would be great.

Cheers.

Czarek Tomczak

unread,
May 23, 2014, 7:17:53 AM5/23/14
to cefp...@googlegroups.com
Chrome's PDF engine was open sourced. PDFium is already in Chromium's trunk.

avi.mat...@gmail.com

unread,
Sep 11, 2015, 3:17:16 AM9/11/15
to CEF Python
On Friday, May 23, 2014 at 4:47:53 PM UTC+5:30, Czarek Tomczak wrote:
> Chrome's PDF engine was open sourced. PDFium is already in Chromium's trunk.

PDFium is only for viewing and rendering PDF's.

Reply all
Reply to author
Forward
0 new messages