Questions tagged [flying-saucer]

Flying Saucer (also called XHTML renderer) is a pure Java library for rendering XML, XHTML, and CSS 2.1 content.

Flying Saucer (also known as xhtmlrenderer) 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.

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).

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 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).

Useful Links:

Synonyms: and

402 questions
0
votes
1 answer

PDF is generated but has no content

I'm able to save a PDF while testing a JAX-RS service through a Chrome Rest Client plugin but it has no content. Any ideas why this code produces a PDF that has no content? @Produces("application/pdf") @GET @Path("/{id}") public…
Zack Macomber
  • 6,682
  • 14
  • 57
  • 104
0
votes
1 answer

Generate PDF file in an appropriate format

For my use, I created a PDF file using flying-saucer library. It was a legacy HTML so I cleaned out the XHTML using HTMLCleaner library. After this I serialize the XML as string then pass it to the iText module of flying-saucer to render it and…
yoda
  • 539
  • 1
  • 12
  • 32
0
votes
1 answer

Flying Saucer PDF not showing color

I have an html that is converted into a PDF with FlyingSaucer that is not displaying any color. the HTML is simple:
Label Information
and the css is: .pdfLabel { text-align:center; background:#033c73; color:#FFF;…
mmaceachran
  • 3,178
  • 7
  • 53
  • 102
0
votes
1 answer

Flying Saucer prints EL expression instead of real values in generated PDF

I'm trying to generate PDF from xhtml page using Flying Saucer. My related codes are below. pdf.xhtml works fine itself. However generated pdf contains EL expression #{basvuruBean.sirketAdi} instead of entered value of sirketadi property of backing…
nsumer
  • 301
  • 4
  • 18
0
votes
2 answers

Custom font is not working with itextrenderer in java

I have embedded my custom fonts in html with @font-face. This working with all browser but when I am trying to convert it to pdf through itextrender in java custom font is not working anymore its taking default fonts like Arial. css code: …
Robert Smith
  • 457
  • 2
  • 9
  • 25
0
votes
1 answer

How to create PDF by Flying Saucer without blocking HTTP response?

I have started to use Flying Saucer for creating PDF from JSF files and it is great! Now I have a problem: I want to use it in our application for creating PDF without blocking HTTP response. Please look the code below: ServletOutputStream…
Michael
  • 10,063
  • 18
  • 65
  • 104
0
votes
2 answers

how to generate pdf from xhtml page dynamically using itext+flying saucer with java

I am using iText+flying saucer for the first time with xhtml pages using JSF 2.0 for simple registration form with regular input fields like firstName,lastName,phone number etc.Once user enters all the data and click on "NEXT" button I have to…
mdp
  • 815
  • 4
  • 17
  • 32
0
votes
1 answer

Cannot view HTML document generated by Jsoup using FlyingSaucer's XHTMLPanel

I just create a HTML document on Java using Jsoup. below is some part of the code public static Document genDoc(String p) throws ProtocolException, IOException, InterruptedException, ParserConfigurationException{ ........ return…
stackunderflow
  • 1,492
  • 1
  • 23
  • 53
0
votes
0 answers

Sending Dynamic Image/Google-Map to Server side from Client

I'm developing a web java application, and there are some dynamic images that I want to use in server side to generate a PDF with Flying Saucer. When im generating the PDF in server side, Flaying Saucer tries to load the image, example:
Hozkar
  • 1
  • 1
0
votes
1 answer

Flying Saucer(xhtmlrenderer) word-split

I am getting a bug with Flying Saucer(xhtmlrenderer) where a word at the end of a line gets split across two lines, eg. thinking gets split into thin king, with king appearing at the beginning of the following line. This is very puzzling since the…
aram063
  • 1,067
  • 13
  • 19
-1
votes
1 answer

How to create outline tree in PDF generated from HTML using Flying saucer Itext JAVA?

How to create outline tree for a PDF generated from HTML using iText (V.5) JAVA ? The outline tree is bookmark tree. I want all headers in my HTML to be nodes in my Outline tree. So it will be like: H1 -H2 --H3 ---H4 And so. Is there any way to do…
user3769778
  • 967
  • 2
  • 7
  • 26
-2
votes
1 answer

How to make non-editable pdf using flying saucer

I am using Thymeleaf + Flying Saucer for generating PDF files. How can I make non-editable PDF using Flying Saucer?
Chamie
  • 15
  • 1
  • 5
1 2 3
26
27