Re: PDF generator/converter
Re: PDF generator/converter
- Subject: Re: PDF generator/converter
- From: Jeff Schmitz <email@hidden>
- Date: Sun, 04 Jan 2009 09:22:26 -0600
I downloaded the example flying saucer stuff and got it to run, but
I'm having trouble figuring out how to wrap this up in a component.
Since I am generating a WOComponent that I want to transform to a
pdf, I'm unsure how to send that finished component (i.e. html file)
to the pdf renderer for further processing. Do I need to somehow
write my WOComponent to a file where the renderer can see it? Or is
there a way to divert it to the renderer directly? i.e. How can I get
a serialized version of a WOComponent for further processing instead
of just sending it back to the user? Or am I off on the wrong path
somehow?
Thanks,
Jeff
On Dec 11, 2008, at 3:57 AM, John Corrigan wrote:
On 10/12/2008, at 1:31 AM, Sherry Tirko wrote:
Hi All,
I'm wondering if anyone knows if there is a pdf generator out there
for WO sites or even a converter for WO Components. I'd like to
take a form and make a pdf version for printing.
Thanks,
Sherry
Another option may be "The Flying Saucer Project" - An XML/XHTML/CSS
2.1 Renderer, 100% Java, open-source (LGPL).
http://xhtmlrenderer.dev.java.net/
This seems a little less known but I've had good success with it (no
affiliation). Converts any XHTML + CSS 2.1 compliant input to other
formats, usually PDF but apparently can do Swing no less. Passes
ACID 2 and has some CSS 3 support. It uses iText internally for PDF
output.
I'm using the latest pre-release without issue (R8pre2 as of Jan
08). Make sure the input validates as XHTML (for the most part, it's
not as strict as http://validator.w3.org/).
WebStart demo app:
https://xhtmlrenderer.dev.java.net/r7/demos.html
Fonts:
It needs to be told about custom fonts (ie. those not available in
the JRE).
Example usage (with fonts):
As a starting point a small example project in plain Java is
attached (see readme).
Sláinte
John
<Example_FlyingSaucerXHTMLRenderer.tgz>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden