Hi,

I have a problem when I try to generate a PDF file from a FOP file that
contains an SVG image. It doesn't matter if the image is inline or if it's
stored as a separate file. My problem is that the PDF file gets generated
but for some reason the java thread "hangs", i.e. even though the work is
finished it doesn't stop executing. Has anyone else encountered this
problem?

Here's the piece of code that I'm using to render the PDF:

        Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
        Logger log = hierarchy.getLoggerFor("fop");
        log.setPriority(Priority.DEBUG);
        Driver driver = new Driver(new InputSource(new
StringReader(template.toString())), outputStream);
        driver.setLogger(log);
        driver.setRenderer(Driver.RENDER_PDF);
 
driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");
        driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
        driver.run();

This code generated this output:

INFO    10068   [fop     ] (): building formatting object tree
DEBUG   10068   [fop     ] (): setting up fonts
INFO    10068   [fop     ] (): [1]
INFO    10068   [fop     ] (): Parsing of document complete, stopping
renderer
DEBUG   10068   [fop     ] (): Initial heap size: 1569Kb
DEBUG   10068   [fop     ] (): Current heap size: 2689Kb
DEBUG   10068   [fop     ] (): Total memory used: 1119Kb
DEBUG   10068   [fop     ] ():   Memory use is indicative; no GC was
performed
DEBUG   10068   [fop     ] ():   These figures should not be used
comparatively
DEBUG   10068   [fop     ] (): Total time used: 8993ms
DEBUG   10068   [fop     ] (): Pages rendererd: 1
DEBUG   10068   [fop     ] (): Avg render time: 8993ms/page

Thanks in advance,

Vladimir Sneblic
Software Engineer
Sytec Resources Limited
        
Phone:  +64 9 917-4264
Fax:    +64 9 355-0070  
Mobile: +64 21 404046
Email:   [EMAIL PROTECTED]   
WWW:  http://www.sytec.co.nz

Important:  This electronic mail message and attachments (if any) are
confidential and may be legally privileged.  If you are not the intended
recipient please contact us immediately and destroy this message.  You may
not legally copy, disclose, disseminate or use the contents in any way.
Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to