diff options
Diffstat (limited to 'src/org/apache/fop/pdf/PDFDocument.java')
-rw-r--r-- | src/org/apache/fop/pdf/PDFDocument.java | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/org/apache/fop/pdf/PDFDocument.java b/src/org/apache/fop/pdf/PDFDocument.java index dc1636381..f4b115770 100644 --- a/src/org/apache/fop/pdf/PDFDocument.java +++ b/src/org/apache/fop/pdf/PDFDocument.java @@ -1004,7 +1004,7 @@ public class PDFDocument { PDFFont font = new PDFFont(++this.objectcount, fontname, PDFFont.TYPE1, basefont, encoding); this.objects.add(font); - fontMap.put(basefont, font); + fontMap.put(fontname, font); return font; } else { byte subtype = PDFFont.TYPE1; @@ -1071,7 +1071,7 @@ public class PDFDocument { makeArray(metrics.getWidths(1))); } - fontMap.put(basefont, font); + fontMap.put(fontname, font); return font; } @@ -1190,6 +1190,19 @@ public class PDFDocument { return xObject; } + public PDFFormXObject addFormXObject(PDFResourceContext res, PDFStream cont, PDFResources formres, String key) { + PDFFormXObject xObject; + xObject = new PDFFormXObject(++this.objectcount, ++this.xObjectCount, + cont, formres.referencePDF()); + this.objects.add(xObject); + this.resources.addXObject(xObject); + if (res != null) { + res.getPDFResources().addXObject(xObject); + } + return xObject; + + } + /** * make a /Page object * @@ -1357,11 +1370,19 @@ public class PDFDocument { * to the list of objects */ PDFAnnotList obj = new PDFAnnotList(++this.objectcount); - this.objects.add(obj); return obj; } /** + * Add an annotation list object to the pdf document + * + * @param obj the annotation list to add + */ + public void addAnnotList(PDFAnnotList obj) { + this.objects.add(obj); + } + + /** * Get the root Outlines object. This method does not write * the outline to the PDF document, it simply creates a * reference for later. |