keiron 2002/11/05 03:09:55
Modified: src/org/apache/fop/render/pdf PDFRenderer.java
Log:
handle unresolved pdf bookmark
fix for font not set after drawing borders
Revision Changes Path
1.127 +17 -13 xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java
Index: PDFRenderer.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -r1.126 -r1.127
--- PDFRenderer.java 3 Nov 2002 16:24:22 -0000 1.126
+++ PDFRenderer.java 5 Nov 2002 11:09:55 -0000 1.127
@@ -275,17 +275,19 @@
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 @@
* 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 @@
if(started) {
currentStream.add("Q\n");
currentStream.add("BT\n");
+ // font last set out of scope in text section
+ currentFontName = "";
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]