You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Adrien RUFFIE <a....@e-deal.com> on 2013/07/26 16:24:33 UTC

FOP + transformer blocking process

Hello all,

I have a problem with transform I have the WordML model with a size of 1245ko (in attachment) and I tried to convert it into pdf thank to FOP apache library.
FOP work correctly, but when I try to convert the result with transformer, it blocks when generating and blocks indefinitely ... below my code:

            String xslPath = dgbDir + "/xsl/Word2FO.xsl";
            Source xsltSrc = new StreamSource(new File(xslPath));
            Transformer transformer = tFactory.newTransformer(xsltSrc);

            // through to FOP
            Result saxres = new SAXResult(fop.getDefaultHandler());

            // Setup input
            byte[] tabByte = wordStr.getBytes("UTF-8");
            ByteArrayInputStream bais = new ByteArrayInputStream(tabByte);
            Source src = new StreamSource(bais);

            // Start the transformation and rendering process
            transformer.transform(src, saxres);

            rtrn = out.toByteArray();


Do you know this problem, a work around exist ? How I can avoid this blocking process ... ?

The last debug log trace I have is:
DEBUG org.apache.fop.fo.FOTreeBuilder  - Building formatting object tree


Thank you and best regards.

Adrien