[css2xslfo-support] Can't get output with FOP, 0-byte pdf's (or worse); issues with Xep as well
Brought to you by:
wdonne
From: Ben M. <bma...@gm...> - 2007-11-22 01:15:05
|
Hi! I am exceptionally interested in css2xslfo, but am pretty bummed that I haven't had any luck so far with getting it to output anything. I'm beginning to wonder if it's my JDK causing the issue, since none of the docs reference 1.5. Any assistance with getting me up and running would be greatly appreciated. Here's where I stand: - java version "1.5.0_06" / Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) / Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode), on ubuntu linux. My $CLASSPATH is unset. - input document (tried various but, this should work, I believe:), as testdoc.xhtml: <html xmlns=" http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <title> XSL Transformations (XSLT) </title> </head> <body> testing </body> </html> - apache fop installed in ./fop-0.93 (also ./fop-0.94, tried both) - (also, I copied css2fopnew1_5_1.jar into ./fop-XXX/lib/ ...) - sample command line tried (finally, from within the fop-XXX/lib/ dir): % java -Dbe.re.stack -jar css2fopnew1_5_1.jar ../../testdoc.xhtml -pdf out.pdf org/apache/fop/apps/FopFactory java.lang.NoClassDefFoundError : org/apache/fop/apps/FopFactory at be.re.css.CSSToFOPNew.convert(CSSToFOPNew.java:132) at be.re.css.CSSToFOPNew.main(CSSToFOPNew.java:315) Uhm, OK. Not sure what to do now. Have tried it from 0.94, same problem. - Trying it with fop (not fopnew): % java -Dbe.re.stack -jar css2fop1_5_1.jar ../../testdoc.xhtml -pdf out.pdf Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/avalon/framework/logger/NullLogger OK, that's different but also not very useful. - Then, giving up on Apache FOP for the moment, just want to try getting SOMEthing created... so downloaded a trial of XEP, installed it in ~/XEP, copied css2xep1_5_1.jar into XEP's lib dir and ran: % java -Dbe.re.stack -Dcom.renderx.xep.CONFIG=../xep.xml -jar css2xep1_5_1.jar testdoc.xhtml -pdf test.pdf which didn't give any errors, but did produce a 0-byte pdf. UPDATE: I did get Xep to spit out some valid PDFs, using different documents. I still don't know why the document above is invalid. And now I'm getting weirdness like that isn't a recognized entity. I'm sure it's not in vanilla XML but I would assume this is OK in this workflow. Stripping those out at least got me a reasonable-looking document, but this is still SO picky (and I really want to make it work with FOP, anyhow). Suggestions? I plan to process random HTML from users, after passing it through tidy. "Reasonably" well formed documents should not cause it to crash, or at least, that's my intention...! Anyone have ideas on how to fix the FOP issue? Or the entity recognition? Thanks, Ben |