Re: Generating PDF files (XSLT, ps, XSL-FO, FOP, etc)
| From: | Colin Guthrie | Date: | Fri, 05 Oct 2007 16:33:47 +0000 |
| Subject: | Re: Generating PDF files (XSLT, ps, XSL-FO, FOP, etc) | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-262823@lists.php.net to get a copy of this message | ||
Larry Garfield wrote:
> On Friday 05 October 2007, Per Jessen wrote:
>> Yannick Warnier wrote:
>>> but you can't generate a PDF using XML and XSLT, although XSLT is, to
>>> my understanding, made to enable export in various formats from the
>>> same XML file.
>> XSLT is a style language, and you could quite possibly make it produce a
>> PDF.
>
> Not quite. You would use XSLT to generate XSL:FO output. You would then use
> a tool like Apache FOP (or various others, free and not) to convert the
> XSL:FO document into a PDF.
>
> I've done this before, but it's been a while. :-)
As XSL can is just a method of transforming XML into into some kind of
output there is theoretically nothing stopping you using XSL to generate
the full PDF I reckon.
If found a really good quote the other day about XSL but I now can't
find the link and it's gone from my history but it was something like:
"You could write a <insert obscure lanaguage here> parser/lexer in XSLT
but I'm not going to." It's a very powerful language but the hardest
part most extreme advocates find is knowing when there is a better/more
practical tool for the job ;)
Col