Re: html to pdf
- From: Ken Starks <straton@xxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 13 May 2008 15:24:08 +0100
Surbhi wrote:
Hi
We have HTML datasheets but now we want then in PDF format because
page layout is very bad when HTML is printed.
I am through with the XML and XSLT part. But donot hav any idea of XSL-
FO.
I guess, i would need to use "fo" tags in the XSLT. Could someone
suggest me some good reference material, or pointers for this.
Its a bit urgent, please do help.
Best Regards
Surbhi
Whether you would be better
to transform your XML directly to 'Formatting Objects' or to
transform it indirectly ( to 'Docbook' or something similar with an
off-the-shelf transformation to xsl-fo ) is a moot point.
There are also a few off-the-shelf stylesheets that convert html
directly to pdf, but the Typographic quality varies.
Whatever, you still need a 'serialiser' to convert the xsl-fo into pdf.
Apache FOP is a popular open source one.
Wikipedia is a good place to start:
http://en.wikipedia.org/wiki/XSL_Formatting_Objects
If you want a complete system, so you can concentrate of learning one bit at a time (such as xsl-fo),
you could try Apache Cocoon, and use the 'Hello World' example
where the same XML is converted to MANY output formats, including
pdf, xhtml, svg, postscript, flash, open document, Excel ...
(There is an example of the kind of stuff you need to
do, at:
http://cocoon.apache.org/2.1/howto/howto-html-pdf-publishing.html
)
Some of the major software vendors have tutorials in the use
of xsl-fo. For example 'Render-X' and 'Antenna House'; most of
the material is just as relevant to a free serialiser such as
Apache FOP. (If graphics are important, you may need a 'try and
see' approach , particularly with vector graphics and
transparency which are degraded or lost by some serialisers).
On the other hand, at least one serialiser now goes beyond the xsl-fo
specification, allowing rudimentary interactive forms in the pdf.
Finally, there are systems which you can use to convert your XML
to LaTeX, and from there you will get very high quality output. But
LaTeX is yet another massive leaning task if none of your team already
know it.
.
- Follow-Ups:
- Re: html to pdf
- From: Andy Dingley
- Re: html to pdf
- References:
- html to pdf
- From: Surbhi
- html to pdf
- Prev by Date: Re: html to pdf
- Next by Date: Middle of word
- Previous by thread: Re: html to pdf
- Next by thread: Re: html to pdf
- Index(es):
Loading