I was just looking at modifying PassiveTeX myself for a short term solution - and Tomcat as this seemed the logical way to go longer term - but my Java skills are very rudimentary.
The example servlet included with FOP will generate the PDFs OK but I can't picture how this would work so as to avoid confusing the AxKit caching - and get the PDF cached
unless it's just as simple as a final redirect
- or maybe using LWP to get the PDF from Tomcat and then outputting it from the final AxKit stage?
(although that sounds like it involves double / triple transferring of the PDF output.)
I will be having a go at this in the near (but not very near) future.
BTW - I managed to get my simple execution of FOP in an XPS script to work (I wasn't setting the JAVA_HOME variable properly).
Mike
Michael Nachbaur wrote:
I haven't released this to CPAN, mainly because I wanted to create a more generic XSL-FO transformation provider before doing so, but I have created a hacked-up copy of Matt Sergeant's PassiveTeX language provider that hands off XSL-FO to FOP. It is pretty inefficient in that it calls the command-line fop.sh application, which means the Java runtime environment kicks off every time, but it works.
For those who would like to play with the code I have so far, you can get at it via my CVS repository at:
http://cvs.nachbaur.com/cgi-bin/viewcvs.cgi/Apache-AxKit-Language-FOP/
An improvement (patches welcome) would be to have the option to pass XSL-FO to a running Tomcat application server that has FOP pre-loaded in a servlet. But my Java skills, thankfully, are too rusty to do this.
On Apr 13, 2005, at 11:11 AM, Mike Trotman wrote:
Hi.
I've been experimenting with AxKit for the past two weeks - so still a new user.
I have successfully set up a XML processing environment to produce nicely formatted HTML
pages using a chain of XSL and XPS translations.
I would now like to add a transformation to XSL-FO and a subsequent PDF generation and display in the browser.
I can successfully generate the PDFs from the command line using XSLT stylesheets and Apache FOP.
Is there any easy way of doing this in AxKit?
I have naively tried running the FOP transformation (inside backticks) in XPS - but cannot get a PDF generated.
And I have also experimented with 'catting' a PDF from XPS - but can't get the content-type recognised by the browser.
(I'm using the '$r->content_type('application/pdf') approach.)
Does anyone have any experience in trying this - or any suggestions on how it should be done?
(The AxPoint demo PDF generat ion works OK.)
Alternatively - is there any way to link AxKit (XSLFO) output to Tomcat - and run FOP from there?
I think there is possibly a principle I am missing. Any help greatly appreciated.
Thanks
Mike
-- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.7 - Release Date: 12/04/2005
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Michael Nachbaur <[EMAIL PROTECTED]> http://nachbaur.com/pgpkey.asc
-- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.9 - Release Date: 13/04/2005
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
