[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] towards smaller XSL-FO page-sequences (due to limitations in FOP)
After reading a bunch of docbook-related lists (via the excellent marc.theaimsgroup.com), I came to understand that the problem with long documents in FOP is that in building a Table of Contents, it uses forward references until the last page is seen, and then it renders a section; due to the forward references, it must hold the entire page-sequence in RAM. I'm using FOP 0.20.5 on a machine with 2 GiB of RAM; the page-sequence I'm trying to render is approximately 557 pages long (when rendered with Antenna House's evaluation XSLFormatter) but usually dies with an java OutOfMemoryError about halfway through that, around 225 page or so. Here's how I run FOP: % env FOP_OPTS="-Xmxw2048M" fop -d -fo large.fo -pdf large.pdf [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] base directory: file:/home/cgw/src/qualys/big/ [INFO] FOP 0.20.5 [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] building formatting object tree [INFO] setting up fonts [INFO] [1] [INFO] [2] [INFO] [3] [DEBUG] Last page-sequence produced 3 pages. [INFO] [4] [DEBUG] Last page-sequence produced 1 pages. [INFO] [1] [INFO] [2] [INFO] [3] [INFO] [4] [INFO] [5] [DEBUG] Last page-sequence produced 5 pages. [INFO] [6] [INFO] [7] [INFO] [8] .... [INFO] [218] [INFO] [219] [INFO] [220] [INFO] [221] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space I'm guessing that it's the exceptional size of the last <fo:page-sequence> for this particular chapter that gives FOP fits; the smaller sections of the document are successfully rendered. The last page-sequence is 41671 lines long (after pretty-formatting with 'xmlstartlet fo'). I suppose the problem is really long fo:page-sequences as they relate to Table of Contents. Other people have run into this problem: I read that one option is to move the ToC to the end of the document but because this document is for electronic delivery, doing that isn't really an option for me. Perhaps a better statement of the problem I have is: Is there a way to get FOP to successfully build ToC's for documents with very long chapter page-sequences? The chapters are anywhere from 300 to 600 pages long. -cgw- -- christopher williams coffee achiever cgw@pobox.com nana korobi, yo oki
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]