From: Jeremias M. <de...@je...> - 2005-11-22 20:01:10
|
Ok, so you're Benny Anderson's colleague, judging from the e-mail address. :-)=20 Looks like a really tricky thing. To your question: I've already told Benny Anderson my ideas: http://sourceforge.net/mailarchive/forum.php?thread_id=3D9027683&forum_id= =3D38496 But I guess it hasn't helped, yet. There are no facilities to turn on logging especially for the ElementMapping. The only thing you can do is to add System.out statement in the FOP and Barcode4J source code and recompile it. Another idea I just had is trying FOP's example servlet found in the examples/servlet directory in the 0.20.5 distribution. That reduces the webapp to a minimum and should provide a reference point against your own webapp. Benny Anderson said you're working on Linux. If you have a Windows box around, please try the same there. Maybe it's a problem with the JDK in use, or maybe it's something with the web container. What web container are you using, BTW? I'm sorry that I'm not able to help you more. If you solve this please let me know the solution. That you don't get any error messages at all is very disturbing because until now I've always received an error message if the Barocde4J Namespace is used in an FO document and FOP did not recognize the barcode extension. The only work-around is to use the Xalan or SAXON extension during the XSLT stage to convert the barcode to an SVG graphic. Since for PDF Barcode4J does the same internally there's no performance penalty. Good luck! On 22.11.2005 20:09:34 Aaron Tavistock wrote: > We're trying to get barcode4j working with our existing application > which acts as a xsl-fo to PDF translator. This part works fine, the > xsl-fo is generated dynamically based on user requests and they get the > results as a PDF file. >=20 > Now we're trying to add some barcodes and barcode4j looks great, except > we can't get it to integrate seemlessly. We can generate a barcode from > the command line and we can generate a barcode as an image using the the > JavaBean within the app server. Unfortunately, using the FOP extension > is failing with no errors, no debug, and no results, we still get ALL > the content outside the instream-foreign-object, just no barcodes. >=20 > My first thought was that there is a classloader issue with the > META-INF/services directory. So I found the method for adding these by > hand using driver.addElementMapping(ElementMapping) and added an > instance of org.krysalis.barcode4j.fop0205.BarcodeElemenetMapping. This > compiles (so the classes are clearly in the classpath) but there is no > change, the results include all fop content except the barcode. >=20 > Heres a snippet of the code: >=20 >=20 > ByteArrayOutputStream out =3D=20 > new ByteArrayOutputStream(); > =20 > InputSource in =3D=20 > new InputSource(new ByteArrayInputStream(rawContent));=20 > =20 > ElementMapping barcodeMapping =3D=20 > new BarcodeElementMapping(); >=20 > Driver driver =3D new Driver(); > driver.setRenderer(Driver.RENDER_PDF); > driver.setLogger(logger); > driver.setInputSource(input); > driver.setOutputStream(out); > driver.addElementMapping(barcodeMapping) > driver.run(); >=20 > byte[] content =3D out.toByteArray(); >=20 >=20 > First, does anyone have any ideas on resolving this? >=20 > Second, is there a way to turn on explicit debuging for this element > mapping? Our logs show FOP starting, processing, and stopping as if > there are no problems but theres no indication that the barcode mapping > was accessed.=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. Get Certified Today > Register for a JBoss Training Course. Free Certification Exam > for All Training Attendees Through End of 2005. For more info visit: > http://ads.osdn.com/?ad_idv28&alloc_id=16845&op=CCk > _______________________________________________ > Barcode4j-users mailing list > Bar...@li... > https://lists.sourceforge.net/lists/listinfo/barcode4j-users Jeremias Maerki |