Questions tagged [xhtmlrenderer]

XHtmlRenderer (also called 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.

Synonym for .

57 questions
32
votes
6 answers

With Flying Saucer, how do I generate a pdf with a page number and page total on every page at the footer?

It took me a little more research than I would have liked to figure this out on my own, so I'm going to post a comprehensive answer here. It seems like the information to do this is spread across many different websites and I'd like to put it in…
Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356
19
votes
4 answers

CSS to PDF,the css in Flying Saucer : -fs-table-paginate result in border-collapse:collapse invalid

Now I am using xhtmlrenderer to covert html to PDF. My maven dependancy as follows: org.mvel mvel2 2.1.0.drools2 compile
FishGel
  • 1,100
  • 2
  • 16
  • 27
13
votes
1 answer

Render image from servlet in flyingsaucer generated pdf

I'm using flyingsaucer to render an xhtml document to pdf through a servlet which returns the generated pdf document. The xhtml document features an image which is requested from another servlet. The image servlet checks who is logged in before…
Edd
  • 8,402
  • 14
  • 47
  • 73
11
votes
2 answers

Render embedded image in PDF using Flying-Saucer from html

I have an xhtml document that I'm turning into a PDF using flyingsaucer. The xhtml has several tags that have a base64 encoded images inline. The source of the xhtml is dynamic so the structure of where the image tags are can vary. This is a…
9
votes
3 answers

Creating PDF reports with flot graph

I am trying to implement an automatic report generation tool for my clients . I need to create reports in pdf format and i am very much comfortable in creating graphs using Jquery flot. I just need a way to get the graphs inside the pdf. I tried…
Adil Shaikh
  • 44,509
  • 17
  • 89
  • 111
8
votes
2 answers

FlyingSaucer LTR/RTL/BiDi issue with arabic text

I'm using flying saucer xhtmlrenderer for building pdf documents. Everything worked fine until now - now we should generate arabic text inside pdf. Xhtmlrenderer is rendering Arabic text in reverse order. I've read somewhere on internet (maybe on…
Askar Kalykov
  • 2,553
  • 1
  • 22
  • 43
8
votes
1 answer

HTML to PDF result in landscape

I am using PDFSharp to generate PDF from html source. PdfGenerator.GeneratePdf(html, PageSize.A4); Generate to pdf works well, but I dont know how I can change page orientation to landscape?
Marek
  • 372
  • 5
  • 15
7
votes
0 answers

Acrobat PDF generated with FlyingSaucer & ITextRenderer seems to be removing links

I have HTML that contains links such as the following:

Web : SPLIThttp://www SPLIT.google SPLIT.fr/

We are…
Menelaos
  • 23,508
  • 18
  • 90
  • 155
7
votes
3 answers

Is it possible to resolve css as a classpath resource using Flying Saucer (XHTML-Renderer)?

I'm trying to package up resources into a jar, but I'm having trouble getting Flying Saucer to find the css on the classpath - I can't construct a URL easily to be able to resolve this seamlessly. Does Flying saucer have a way of specifying…
Stephen
  • 19,488
  • 10
  • 62
  • 83
6
votes
2 answers

Resolving protected resources with Flying Saucer (ITextRenderer)

I'm using Flying Saucer to create a pdf from xhtml, hosted on a tomcat server. Most of the images included in the pdf are publicly available (logos and so on), but some of them are protected behind a login (that is, they are streamed through a…
ManiSto
  • 648
  • 1
  • 8
  • 23
6
votes
2 answers

What's the easiest way of converting an xhtml string to PDF using Flying Saucer?

I've been using Flying Saucer for a while now with awesome results. I can set a document via uri like so ITextRenderer renderer = new ITextRenderer(); renderer.setDocument(xhtmlUri); Which is nice, as it will resolve all relative css resources etc…
Stephen
  • 19,488
  • 10
  • 62
  • 83
5
votes
1 answer

How to convert url of html page to pdf in java using iText & flying saucer?

I've just downloaded xhtmlrenderer and iText jar files. I can make pdf files by using these jars. What I exactly want is: I need to create pdf if I give one valid URL (say "https://xhtmlrenderer.dev.java.net/news.html") in the place of "inputFile".…
Vinothkumar Arputharaj
  • 4,567
  • 4
  • 29
  • 36
5
votes
2 answers

How to create TOC or index using the Flying Saucer project?

I convert HTML files to PDF format using The Flying Saucer Project. This are documents containing repetitive information - premises and their addresses, let's call them elements. At the end of a document I need to create an index. Each index entry…
Daniel Stefaniuk
  • 5,264
  • 2
  • 17
  • 13
4
votes
1 answer

How to use CSS3 orphans and widows properties with xhtmlrenderer (flying saucer) R8?

I read in this bugfix description that xhtmlrenderer should support the "orphans" and "widows" properties of CSS3 since Version R5. Using R8, it seems not to work. div.textContent { orphans: 5; widows: 3; } But it looks like this: The…
Zeemee
  • 10,486
  • 14
  • 51
  • 81
4
votes
2 answers

flying saucer (xhtmlrenderer) doesn't bold my font?

I'm using a custom truetype font in a pdf generated by flying saucer xhtmlrenderer. ITextRenderer renderer = new ITextRenderer(); renderer.getFontResolver().addFont("myfont.ttf", BaseFont.CP1252,…
pstanton
  • 35,033
  • 24
  • 126
  • 168
1
2 3 4