Automatically exported from https://code.google.com/p/flying-saucer/
Flying Saucer takes XML or XHTML and applies CSS 2.1-compliant stylesheets to it, in order to render to PDF (via iText), images, and on-screen using Swing or SWT. The library implements (basically) the entirety of CSS 2.1 and aims to be fully compliant with the W3C specification; it includes a small handful of CSS 3 features.
The source code is hosted on GitHub, here: http://github.com/flyingsaucerproject/flyingsaucer
We're even in the Wikipedia!
Check out our User's Guide (also available as downloadable pdf), our mailing list archives on Mark Mail and our FAQ.
There are also some older articles which may have slightly out-of-date information
- Generating PDFs for Fun and Profit with Flying Saucer and iText, by Josh Marinacci from June 2007. Josh covers using Flying Saucer to generate PDF documents.
- Combine JSF Facelets and the Flying Saucer XHTML Renderer by Jacobus Steenkamp from October 2006. Jacobus covers using Flying Saucer to generate PDF, image and SVG output, with a focus on on-the-fly generation.
Flying Saucer supports all of CSS 2.1 with a few exceptions. Consult the issue tracker for more information on what is not supported (in particular, the issues with a summary of "Support ...") or ask on the online discussion group. If you do encounter a compliance bug or other unexpected behavior, please open a bug or post to the online discussion group.
Features:
- 100% Java XML+CSS layout engine with native PDF, Swing, image rendering.
- Strong support for the CSS 2.1 specification including extensions to better support paged media.
- Good performance.
- Support for XHTML including forms.
- Arbitrary elements may be replaced with custom content.
- Limited support for dynamic effects (for example, the :hover pseudo-class and links)
- Some support for PDF specific features (for example, bookmarks and internal links). More coming soon.Limitations:
- Resource loading is single threaded and occurs inline with layout.
- Support for XHTML is weaker than XML+CSS (for example, not all XHTML presentational attributes are supported nor are X/HTML features like the
<object>
element). - No support for legacy HTML (although there are several open source Java HTML cleaners of varying quality available).
- No support for incremental layout (applies to screen media only).
Our source code is hosted on GitHub as we've decided that we prefer Git for collaborative code development, and would like our users to take advantage of the freedom that a DVCS has to offer. This Google Code project has no source code. Go to our GitHub project if you would like the current sources or would like to fork or branch the project for your own purposes.
From the project's inception in 2004 until April 2010, it was hosted on java.net. We decided in 2010 to move the project to Google Code.
Flying Saucer was launched in 2004 - there is quite a bit of useful information available on our mailing lists, in the archives. We recommend you use Mark Mail - include list:net.java.dev.xhtmlrenderer.users
to restrict queries to our old user's mailing list.
Our new, ongoing discussions are carried out in our online discussion group.
Our User's Guide (and our prior project website) are produced using the Xilize syntax and rendering engine. The content is written in Xilize text markup, then converted to XHTML using the Xilize converter. We'd like to thank the Xilize team at CenteredWork for sharing this library. Try it out! It's a great way to write websites quickly, without losing control over formatting. Check it out!
JetBrains, the makers of IntelliJ IDEA, has generously sponsored a license letting us use IDEA on this project under their Open Source Program. We are grateful for their support!
The Specs:
- W3C XHTML specification
- CSS 2.1 Specification (exhaustive but precise)
Libraries