In my previous post I attempted to generate PDF on the fly using iText library. My goal was to parse HTML snippet into PDF. Unfortunately, as I discovered iText alone is not powerful enough as HTML parser. iText is not flexible enough to manipulate the CSS. Its understandable, since iText‘s main functionality is PDF generation and not HTML parsing.
While trying to find workaround iText limitations, I came across Flying Saucer Java library. Flying Saucer is XML/XHTML/CSS 2.1 renderer, that uses iText and allows to render CSS stylesheets and XHTML, either static or generated, directly to PDFs.
I want to say that Flying Saucer does a beautiful job. You can check this out by trying to export current post to PDF ![]()
Joshua Marinacci, the Flying Saucer project lead wrote a nice tutorial that explains how to generate PDF using Flying Saucer.
loading...
Related posts:
- Export to PDF Using iText Java-PDF Library
I had some time during this weekend, so I used iText, free Java-PDF library to make a plug in for Pebble blogging software.... - Export Pebble Blog Entry to PDF Plugin
In one of my previous posts, I described how I implemented a plug in for Pebble blogging software that allows export of blog... - Online PDF Generator
Online PDF generator now available. This simple but useful online PDF generator tool allows you to generate PDF document online from HTML snippets.... - Generate PDF with Flying Saucer and iText by Adding Font Files
In this post, I would like to show how to load font files and format specific sections of the document at run time,... - Blogging Software Pebble is Almost Six Years Old!
Simon Brown, the creator of Pebble blogging tool has retired. He stepped back due to personal reasons after 5 years of leading the...
