Title: Possibility of converting from XML to PDF without the intermediate stage of FO format
I have also noticed that doing the XML to FO to PDF in memory as opposed to writing to disk reduces time by about 80% in the samples that I tried.
 
I was using iTEXT, XEP, FOP, RTF2FO etc.
 
Below you say that a 56 page PDF from XML files takes about 2 minutes. That sounds really good - I was working with 2 pages and 2 XML files generating FO doing an XSLT transform to merge and coverting to PDF and that was taking me about 1.5 minutes on a 333MHZ machine.
 
I was just curoius what the total sizes of the XML, the FOs and the PDF were. Did you concate the FOs? how did you get a single PDF (what tool)?
 
steveb
-----Original Message-----
From: Jie Wang [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 11, 2002 6:37 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Possibility of converting from XML to PDF without the intermediate stage of FO format

The size of xml file is 330K.
-----Original Message-----
From: Buonincontri, Steve (CAP, MMF, ITSS) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 11, 2002 3:37 PM
To: [EMAIL PROTECTED]
Subject: RE: Possibility of converting from XML to PDF without the intermediate stage of FO format

Just curious - what are the sizes of the XML, FO and PDF files?
 
-----Original Message-----
From: Jie Wang [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 11, 2002 5:31 PM
To: '[EMAIL PROTECTED]'
Subject: Possibility of converting from XML to PDF without the intermediate stage of FO format

How to decrease the responding time of converting from XML to PDF ? Currently it took me about 2 Mins to generate my 56 page PDF from XML files. Is that possible to convert from XML to PDF without the intermediate stage of FO format ?


Thanks,
Jie



-----Original Message-----
From: Oleg Tkachenko [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 11:47 AM
To: [EMAIL PROTECTED]
Subject: Re: FOP error with <xsl:copy-of .../>


There are no chapter_title or sub formatting objects in xsl-fo, you have to
transform it in xslt to fo objects, like <fo:inline> rather than just copying
them to the fo.

[EMAIL PROTECTED] wrote:
>   Hi,
>
>   I am attaching the test xsl,xml and the java files.  The problem is that the description of any node could have tags and text mixed.  If I use <xsl:value-of> (with FOP), I get only

>   the text and when I use <xsl:copy-of> (without FOP embeded), I get the desired result, but with FOP I am getting 'error 10231'   I have tried everything that I could think of and could not come up with the correct stylesheet. 

>   I truly could use your help!!!!
>   I am anxiously waiting for a solution.
>
>   Thank you so much in advance.
>   Norm
>
>   --- ERROR ---------
>   ERROR   10231   [fop     ] (): Unknown formatting object null^chapter_title
>   Exception in thread "main" org.apache.fop.apps.FOPException: java.lang.NullPoin
>   erException
>          at org.apache.fop.apps.Driver.render(Driver.java:486)
>          at test1.main(test1.java:102)
>
>   -------------------- test.xml ----------------------------------
>   <?xml version="1.0" encoding="iso-8859-1"?>
>   <?xml-stylesheet type='text/xsl' href=''?>
>   <document id="DOCUMENT 810-005_103">
>      <chapter id="test">
>          <chapter_title>Testing Chapter <sub>3</sub></chapter_title>           
>      </chapter>
>   </document>
>
>   ------------------  test.xsl ---------------------------
>   <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
>   xmlns:fo="http://www.w3.org/1999/XSL/Format">
>     <xsl:template match="document">
>      <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> 
>        <fo:layout-master-set>
>          <fo:simple-page-master page-width="200mm" master-name="Page1" page-height="280mm"
>   margin-top="10mm" margin-bottom="10mm" margin-left="20mm" margin-right="20mm">
>            <fo:region-body margin-top="0mm" margin-bottom="10mm"
>                         margin-left="0mm" margin-right="0mm"/>
>          </fo:simple-page-master>
>          <fo:page-sequence-master master-name="PS1">
>            <fo:single-page-master-reference master-name="Page1"/>
>          </fo:page-sequence-master>     
>        </fo:layout-master-set>
>       
>        <fo:page-sequence  master-reference="Page1">
>          <fo:flow  flow-name="xsl-region-body">
>               <xsl:apply-templates/>
>          </fo:flow >
>        </fo:page-sequence >     
>      </fo:root>
>    </xsl:template>
>   
>   <xsl:template match="document/chapter/chapter_title">
>          <fo:block space-after="3mm" font-size="14pt" text-align="center" break-before="page"
>   break-after="page">
>            <xsl:copy-of select="."/>
>           </fo:block>
>     </xsl:template>
>   </xsl:stylesheet>
>
>   --------------- test.java file just the main()----------------
>   public static void main () {   
>
>              File xmlFile=new File("test.xml");
>              File xslFile=new File("test.xsl");
>              File pdfFile=new File("test.pdf");
>
>              Logger log = null;
>
>                if(log == null) {
>                  Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
>                  log = hierarchy.getLoggerFor("fop");
>                  log.setPriority(Priority.WARN);
>                }
>                      FileOutputStream OutFile = new FileOutputStream(pdfFile);
>                      ByteArrayOutputStream out = new ByteArrayOutputStream();
>                      Driver driver=new Driver();
>                     
>                      driver.setLogger(log);
>                      driver.setRenderer(Driver.RENDER_PDF);
>                      InputHandler ih=new XSLTInputHandler(xmlFile,xslFile);
>                      XMLReader p=ih.getParser();
>                      driver.setOutputStream(OutFile);
>                      driver.render(p, ih.getInputSource());
>                      OutFile.close();
>               }
>      }//main
>
>
> __________________________________________________________________
> Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with [EMAIL PROTECTED] http://shopnow.netscape.com/

>
> Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
>



--
Oleg Tkachenko
Multiconn International, Israel

Reply via email to