At 09:35 25/02/2002, Raimund Kammering wrote: >Hi, > >I want to dynamically include an html page into a pdf document. >The process is as follows: > A java servlet concatenates a number of xml files controlled > by one xsl file. > > Now I also want to include an html file into this procedure. > How can this be done?
Aha - you are after the Holy Grail of FOP and XSL:FO OK... FOP converts XSL:FO (plus SVG images, plus bitmap graphics) into PDF (and other formats). If you want to include HTML then we have to turn it into one of these formats. You have already considered bitmaps and wisely rejected that idea. I don't think there is an HTML->SVG converter but it *might* be a way to go. Most people think of (and then have problems with) the idea of converting HTML to XSL:FO via XHTML. Because XHTML is valid XML it can be processed with XSLT. So for instance we might attempt to take the html, use Tidy on it to convert it to valid XHTML, and then use Antenna's XSLT for converting XHTML to XSL:FO The problem with this is that it is a lot of work, and Antenna's XSLT does not work with FOP (in my experience) only their own XSL:FO engine. Which brings me to the conclusion which most people reach - there is no generic way of converting web pages into PDF using FOP. Most people end up deciding to convert the source material into XML instead of leaving it as html. Now if you had a web browser which saved the displayed screen as SVG or PDF then we might have a chance.... (If you are still interested Tidy can be found on SourceForge and you can find the XHTML->XSL:FO stuff on Antenna's site) <plug> PS I am offering free consultancy to London firms. This includes FOP. Check out http://www.OWAL.co.uk/ </plug> <apology repeat="as often as necessary"> My FOP FAQ has been down since I moved machines. Sorry. I'm going to try turning it into xdocs format so it can be stored in the CVS and delivered with FOP. </apology> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
