Re: [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: <wer...@re...> - 2007-11-22 08:11:10
|
Hi Ben, There are two problems. First, the document is wrong in that XHTML doesn't allow text directly in the element "body". You should wrap it in a block-level element such as "p" or "div". Second, the problem with FOP is that you have to copy the fop.jar file, which is in <FOP>/build/, to <FOP>/lib/. The manifest file in fop.jar expects to find the libraries as siblings in the same directory. Let me know if you make progress. Best regards, Werner. Ben Margolin wrote: > 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; <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 > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > css2xslfo-support mailing list > css...@li... > https://lists.sourceforge.net/lists/listinfo/css2xslfo-support -- Werner Donné -- Re http://www.pincette.biz Engelbeekstraat 8 http://www.re.be BE-3300 Tienen tel: (+32) 486 425803 e-mail: wer...@re... |