Re: Dynamic PDF - which method?

From: Lothar Kimmeringer (news200408_at_kimmeringer.de)
Date: 08/21/04


Date: Sat, 21 Aug 2004 12:07:10 +0200

On Sat, 21 Aug 2004 03:49:28 GMT, RobM wrote:

> One reason I was interested is in the existing web app the document is shown
> on the page for a preview (before the user confirms and a PDF is made) so we
> have the HTML to start with, as well as the CGI Powerbuilder where the PDF
> is generated from.

[...]

> Interested in what you say about Apache FOP; I've not read in depth yet, but
> have looked at XMLMill http://www.xmlmill.com/products/xmlmillforjava.html
> that is based on Apache FOP which seems to use XML (the page data) and XSL -
> which I've not used before but seems to be HTML with tags referring to the
> XML file to obtain the data placed at the proper places in the HTML. So is
> still basically HTML but split data (which is easy as we can export XML from
> the database). Did you use Apache FOP in a similar way?

Apache FOP uses a Formatted Object (FO) to create PDF, SVG or
other formats. FO is XML-based and is generally created out
of a XML containing the data and a XSL-file that contains the
rules how the data should be "transformed" to whatever you
want.

In your case, XML with XSL would be a quite good fitting solution,
because you "only" need two XSL-files for your preview/PDF-creation-
scenario. One XSL is used for creating the HTML-preview, the other
one is used for creating the FO-file used by Apache-FOP to create
PDF or other target-formats.

With iText you would need two different mechanisms to create
HTML on the one side and PDF on the other. So I think FOP
would be the better solution for you in this case.

Regards, Lothar

-- 
Lothar Kimmeringer                E-Mail: spamfang@kimmeringer.de
               PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)
Always remember: The answer is forty-two, there can only be wrong
                 questions!


Relevant Pages

  • Re: From XML to HTML and PDF
    ... Wendy S wrote: ... Once I get that part settled, I need to go from XML to either HTML (via ... > a Struts/Tiles webapp) and to PDF for the 'printer friendly' version. ... > I'm thinking XSLT will turn the XML into nicely formatted HTML. ...
    (comp.lang.java.programmer)
  • Re: Jargons of Info Tech industry
    ... What an HTML interpreter does by _design_ is not in the same category ... I'm talking about what HTML is designed to do, which is to describe a presentation ... IMO pdf comes close. ...
    (comp.unix.programmer)
  • Re: Editors
    ... >> and simply split up the big HTML version Randy's already got? ... in something easier to browse than PDF files...to the point that both ... which about a decade ago now - Microsoft switched to these CHM files, ... RTF files don't come into this and would prove more horrible than what ...
    (alt.lang.asm)
  • Re: A prediction about the Presidential campaign
    ... easily done in straight HTML. ... There aren't any fonts that automatically use that ligature whenever ... I'm not a font designer. ... Easy in PDF: I just tell my graphing program to spit out ...
    (rec.arts.sf.fandom)
  • Re: HTML and XML
    ... you do _not_ need Adobe to create PDF files. ... You may also want to look at just XML (since ... HTML is a sub-set of HTML), but that opens such a huge world it may ... >of my reports out as HTML. ...
    (comp.databases.ms-access)

Loading