[ https://issues.apache.org/jira/browse/FOP-3269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simon Steiner resolved FOP-3269. -------------------------------- Fix Version/s: main Resolution: Fixed https://github.com/apache/xmlgraphics-fop/commit/2971201e375599af5f2ee818333c82ebeb739b33 > Allow GC to remove structelem tree > ---------------------------------- > > Key: FOP-3269 > URL: https://issues.apache.org/jira/browse/FOP-3269 > Project: FOP > Issue Type: Bug > Reporter: Simon Steiner > Assignee: Simon Steiner > Priority: Major > Fix For: main > > > Generate pdf twice with a table with 10k fo:table-body's with using -Xmx500m > should not give OOM > {code:java} > public void xxx() throws Exception { > FopConfParser fopConfParser = new FopConfParser(new File("fop.xconf"), > new File("xxx").toURI()); > FopFactoryBuilder fopFactoryBuilder = > fopConfParser.getFopFactoryBuilder(); > fopFactoryBuilder.setStrictFOValidation(false); > FopFactory fopFactory = fopFactoryBuilder.build(); > x(fopFactory); > fopFactory = fopFactoryBuilder.build(); > x(fopFactory); > } > private void x(FopFactory fopFactory) throws Exception { > FOUserAgent userAgent = fopFactory.newFOUserAgent(); > Transformer transformer = > TransformerFactory.newInstance().newTransformer(); > Source src = new StreamSource(new FileInputStream("out.if")); > IFDocumentHandler documentHandler > = userAgent.getRendererFactory().createDocumentHandler(userAgent, > MimeConstants.MIME_PDF); > documentHandler.setResult(new StreamResult(new NullOutputStream())); > IFUtil.setupFonts(documentHandler); > IFParser parser = new IFParser(); > Result res = new SAXResult(parser.getContentHandler(documentHandler, > userAgent)); > transformer.transform(src, res); > } > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)