From: <chr...@vi...> - 2004-09-24 15:09:23
|
Hello, I'm using FOP (in a Servlet) and I need to edit barcodes. Until now, I process XSL-FO from XML+XSLT (XML2PDF) with the code provided by the FOP site : ***************************************************************** driver.setOutputStream(out); // Setup XSLT TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(xsltfile)); // Set the value of a <param> in the stylesheet transformer.setParameter("versionParam", "2.0"); // Setup input for XSLT transformation Source src = new StreamSource(xmlfile); // Resulting SAX events (the generated FO) must be piped through to FOP Result res = new SAXResult(driver.getContentHandler()); // Start XSLT transformation and FOP processing transformer.transform(src, res); ******************************************************************** 1) I think that the Xalan extension will be used during the XSLT step (without any code change in the servlet), am I wrong ? 2) If I want yo use the FOP extension, will I have to divide the PDF generation in 2 steps in my servlet (XML2FO and FO2PDF) ? 3) If I want to rotate the barcodes, is the xalan extension the only solution ? 4) Refering to the last message in the forum (Can Barcode4j grab fo:page-number from FOP), I have a client who would like to have a barcode on the first page of its edition containing the total number of pages. So my last question is : Can Barcode4j grab <fo:page-number-citation ref-id="last-page"/> from FOP ? Thanks for ypour reply and congratulations for your work (in Barcode4j and fop)! |