diff options
author | Keiron Liddle <keiron@apache.org> | 2002-11-05 11:09:55 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2002-11-05 11:09:55 +0000 |
commit | dd155c22405334678529fcc06d7e672d584039e8 (patch) | |
tree | 274a95e6ed4dbd1d803e0c1d5d15407386a84459 /src/org | |
parent | f719551c92ecb55aacea4cf50bbdb9cc996258bc (diff) | |
download | xmlgraphics-fop-dd155c22405334678529fcc06d7e672d584039e8.tar.gz xmlgraphics-fop-dd155c22405334678529fcc06d7e672d584039e8.zip |
handle unresolved pdf bookmark
fix for font not set after drawing borders
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195418 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/apache/fop/render/pdf/PDFRenderer.java | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/org/apache/fop/render/pdf/PDFRenderer.java b/src/org/apache/fop/render/pdf/PDFRenderer.java index 9f6d9ea3a..6fe9dad6b 100644 --- a/src/org/apache/fop/render/pdf/PDFRenderer.java +++ b/src/org/apache/fop/render/pdf/PDFRenderer.java @@ -275,17 +275,19 @@ public class PDFRenderer extends PrintRenderer { PDFOutline outlineRoot = pdfDoc.getOutlineRoot(); PDFOutline pdfOutline = null; PageViewport pv = outline.getPage(); - Rectangle2D bounds = pv.getViewArea(); - double h = bounds.getHeight(); - float yoffset = (float)h / 1000f; - String intDest = (String)pageReferences.get(pv.getKey()); - if (parentOutline == null) { - pdfOutline = pdfDoc.makeOutline(outlineRoot, - outline.getLabel(), intDest, yoffset); - } else { - PDFOutline pdfParentOutline = parentOutline; - pdfOutline = pdfDoc.makeOutline(pdfParentOutline, - outline.getLabel(), intDest, yoffset); + if(pv != null) { + Rectangle2D bounds = pv.getViewArea(); + double h = bounds.getHeight(); + float yoffset = (float)h / 1000f; + String intDest = (String)pageReferences.get(pv.getKey()); + if (parentOutline == null) { + pdfOutline = pdfDoc.makeOutline(outlineRoot, + outline.getLabel(), intDest, yoffset); + } else { + PDFOutline pdfParentOutline = parentOutline; + pdfOutline = pdfDoc.makeOutline(pdfParentOutline, + outline.getLabel(), intDest, yoffset); + } } for (int i = 0; i < outline.getCount(); i++) { @@ -418,7 +420,7 @@ public class PDFRenderer extends PrintRenderer { * This draws the background and border traits for an area given * the position. * - * @param block the area to get teh traits from + * @param block the area to get the traits from * @param startx the start x position * @param starty the start y position * @param width the width of the area @@ -526,6 +528,8 @@ public class PDFRenderer extends PrintRenderer { if(started) { currentStream.add("Q\n"); currentStream.add("BT\n"); + // font last set out of scope in text section + currentFontName = ""; } } |