org.apache.fop.pdf
Class PDFResourceContext
java.lang.Object
|
+--org.apache.fop.pdf.PDFObject
|
+--org.apache.fop.pdf.PDFResourceContext
- Direct Known Subclasses:
- PDFPage
- public class PDFResourceContext
- extends PDFObject
The PDF resource context.
There is one of these for every page in a PDF document. The object
specifies the dimensions of the page and references a /Resources
object, a contents stream and the page's parent in the page
hierarchy.
Modified by Mark Lillywhite, mark-fop@inomial.com. The Parent
object was being referred to by reference, but all that we
ever used from the Parent was its PDF object ID, and according
to the memory profile this was causing OOM issues. So, we store
only the object ID of the parent, rather than the parent itself.
Methods inherited from class org.apache.fop.pdf.PDFObject |
encode, encodeString, encodeText, formatDateTime, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, hasObjectNumber, output, referencePDF, setDocument, setObjectNumber, toPDF, toPDFString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resources
protected PDFResources resources
- the page's /Resource object
annotList
protected PDFAnnotList annotList
- the list of annotation objects for this page
PDFResourceContext
public PDFResourceContext(PDFResources resources)
- Creates a new ResourceContext.
- Parameters:
resources
- the /Resources object
getPDFResources
public PDFResources getPDFResources()
- Get the resources for this resource context.
- Returns:
- the resources in this resource context
addAnnotation
public void addAnnotation(PDFObject annot)
- set this page's annotation list
- Parameters:
annot
- a PDFAnnotList list of annotations
getAnnotations
public PDFAnnotList getAnnotations()
- Get the current annotations.
- Returns:
- the current annotation list
addGState
public void addGState(PDFGState gstate)
- A a GState to this resource context.
- Parameters:
gstate
- the GState to add
addShading
public void addShading(PDFShading shading)
- Add the shading to the current resource context.
- Parameters:
shading
- the shading to add
Copyright 1999-2006 The Apache Software Foundation. All Rights Reserved.