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
1
vote
1 answer

content: url('image.png') in flying saucer @page @top-left

does flying saucer support putting images in CSS3 margin-boxes? I tried something like @page { @top-left { content: url('/resources/media/image.png'); } } but this doesn't seem to work. Is there any solution to put the image where I…
Kamil Roman
  • 973
  • 5
  • 15
  • 30
1
vote
2 answers

How to render Asian characters in a PDF using xhtmlrenderer

I was wondering what steps were needed to render Asian characters using the java based xhtmlrenderer (flying saucer) library? I am wanting to render the following: 同名の映画のモデ Without any font settings being added to…
Mark Derricutt
  • 979
  • 1
  • 11
  • 20
1
vote
1 answer

Get the computed style of a DOM element

After a layout is completed, I want to parse through the DOM tree and get the computed styles of each element. Is this possible. The closest I could get is the below snippet, but it gives only uncomputed styles. Element elm = (Element)…
samarjit samanta
  • 1,285
  • 2
  • 16
  • 29
1
vote
1 answer

HeadlessException using docx4j xhtmlrenderer on RedHat server

I'm getting a java.awt.HeadlessException when using a Docx4jReplacedElementFactory on a RedHat server. Does anyone know of a workaround for this? (other than running Xvfb) I've drilled in to the stack trace and the source of the problem is…
David Carboni
  • 1,556
  • 23
  • 24
1
vote
1 answer

Using flying saucer and docx4j on the same project

I have a project where I want to be able to format xhtml documents into both PDF format and Docx format. I've been using flyingsaucer to format PDF documents for some time and always had to use an older version of iText for compatibility reasons.…
Edd
  • 8,402
  • 14
  • 47
  • 73
0
votes
1 answer

How to render in-memory HTML code to an image?

I found http://code.google.com/p/flying-saucer/ which should be the most suitable solution for my project. But the documents only seem to be able to read from file. But I my case I want to render from code and I don't want to save a temporary XML…
Shisoft
  • 4,197
  • 7
  • 44
  • 61
0
votes
4 answers

Java in a Microsoft shop

I've been introduced to this wonderful project, xhtmlrenderer; the flying saucer project. Problem is, is that where I work, it's strictly a microsoft shop and I haven't done any java development since college, and a smidge of WebSphere a few years…
David
  • 19,389
  • 12
  • 63
  • 87
0
votes
0 answers

HTML to PDF using flying saucer: bold text is blurry

I am using flying saucer (xhtmlrenderer) 9.1.22 to create PDF files from HTML content, but the bold text in PDF looks blurry. this is my code snippet: ITextRenderer renderer = new ITextRenderer(); renderer.getFontResolver().addFont("arial.ttf",…
Zak FST
  • 361
  • 3
  • 6
  • 17
0
votes
1 answer

Not Receiving Data Back From Geonames For an API Request to Render a HTML Response

I have updated the below code and also added my username into the geonames request upon further research but still no joy. Could be the value i'm trying to pass from the HTML so i'm including that also now. 1. Find Nearest Ocean …
0
votes
0 answers

XHTML element not allowed as child of XHTML element body in this context

Although this page seems to load file, I get an error from NU HTML checker. Not sure how to clear the error, because it seems everything in the body would of course be a child of the XHTML body element.
0
votes
2 answers

Add HTML to iText document in memory using XHTMLrenderer (FlyingSaucer)

I am using iText 2.1.7 to generate a document from a database. One of the fields I need to add is in XHTML format. I can use the HTMLWorker class to generate the HTML but this is a bit limited. I convert this to XHTML using the following…
Neil
  • 227
  • 2
  • 8
0
votes
1 answer

XHTML to Docx conversion using docx4j not reading font-size style

XHTML: 18F, Mirae Asset CENTER1 West Tower converted…
Sourav
  • 73
  • 8
0
votes
2 answers

Content overlapping when change doctype from HTML to XHTML

I want to change my doctype to XHTML but it breaks all the content in my page, how to resolve the issue..? I'll show you what was the change I've done on my document. from this doc to…
Paul
  • 69
  • 1
  • 1
  • 8
0
votes
1 answer

org.xml.sax.SAXParseException for Japanese character. The content of elements must consist of well-formed character data or markup

Getting the following the error in the Java program if the HTML has the following Japanese character. ファミリーコンパクト 270ml ●植物成分使用●型番:コンパクト●容量(mL):270●しつこい油汚れをスッキリ落とします。 Using org.w3c.tidy.Tidy to parse HTML and then using…
0
votes
1 answer

xhtml rendered to pdf with base64 img src

I am trying to create PDF which should contain image, but does not. The xhtml that is converting to PDF contains img tag with correct base64 data, because when I try it in any html I see correct content. I am using core-renderer R8 version. I kinda…