gmazza 2004/12/12 06:14:56 Modified: src/java/org/apache/fop/area AreaTreeHandler.java Log: Moved PDF bookmark creation to endDocument(). (Fixed bug, was being created after each page sequence in document.) Revision Changes Path 1.23 +9 -2 xml-fop/src/java/org/apache/fop/area/AreaTreeHandler.java Index: AreaTreeHandler.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/AreaTreeHandler.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- AreaTreeHandler.java 6 Dec 2004 05:37:17 -0000 1.22 +++ AreaTreeHandler.java 12 Dec 2004 14:14:56 -0000 1.23 @@ -39,6 +39,7 @@ import org.apache.fop.fo.extensions.Outline; import org.apache.fop.fo.extensions.Bookmarks; import org.apache.fop.fo.pagination.PageSequence; +import org.apache.fop.fo.pagination.Root; import org.apache.fop.layoutmgr.PageSequenceLayoutManager; /** @@ -78,6 +79,9 @@ // AreaTreeModel in use private AreaTreeModel model; + // The fo:root node of the document + private Root rootFObj; + // HashMap of ID's whose area is located on one or more PageViewports // Each ID has an arraylist of PageViewports sharing the area with this ID private Map idLocations = new HashMap(); @@ -193,6 +197,8 @@ * @throws SAXException if there is some error */ public void endDocument() throws SAXException { + addBookmarks(rootFObj.getBookmarks()); + model.endDocument(); if (outputStatistics) { @@ -224,9 +230,10 @@ log.debug("Current heap size: " + (memoryNow / 1024L) + "Kb"); } + rootFObj = pageSequence.getRoot(); + // If no main flow, nothing to layout! if (pageSequence.getMainFlow() != null) { - addBookmarks(pageSequence.getRoot().getBookmarks()); PageSequenceLayoutManager pageSLM = new PageSequenceLayoutManager(this, pageSequence); pageSLM.run();
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]