| Modifier and Type | Field and Description |
|---|---|
| private final ResourceCache | |
| private final Map | |
| private final COSDictionary |
| Access | Constructor and Description |
|---|---|
| public | |
| public | PDResources(COSDictionary
The cos dictionary for this resource. resourceDictionary)Constructor for reading. |
| public | PDResources(COSDictionary
The cos dictionary for this resource. resourceDictionary, ResourceCache The document's resource cache, may be null. resourceCache)Constructor for reading. |
| public | PDResources(COSDictionary
The cos dictionary for this resource. resourceDictionary, ResourceCache The document's resource cache, may be null. resourceCache, Map<COSName, SoftReference<PDFont>> The document's direct font cache. Must be mutable directFontCache)Constructor for reading. |
| Modifier and Type | Method and Description |
|---|---|
| public COSName | |
| public COSName | Returns: the name of the resource in the resources dictionarythe color space to add colorSpace)Adds the given color space to the resources of the current page and returns the name for the new resources. |
| public COSName | Returns: the name of the resource in the resources dictionarythe extended graphics state to add extGState)Adds the given extended graphics state to the resources of the current page and returns the name for the new resources. |
| public COSName | |
| public COSName | Returns: the name of the resource in the resources dictionarythe pattern to add pattern)Adds the given pattern to the resources of the current page and returns the name for the new resources. |
| public COSName | Returns: the name of the resource in the resources dictionarythe property list to add properties)Adds the given property list to the resources of the current page and returns the name for the new resources. |
| public COSName | Returns: the name of the resource in the resources dictionarythe image to add image)Adds the given image to the resources of the current page and returns the name for the new resources. |
| public COSName | Returns: the name of the resource in the resources dictionarythe form to add form)Adds the given form to the resources of the current page and returns the name for the new resources. |
| public COSName | |
| private COSName | add(COSName kind, String prefix, COSObjectable object)
Adds the given resource if it does not already exist. |
| private COSName | |
| private COSBase | |
| public PDColorSpace | Returns: a new color space.Name of the color space resource. name)Returns the color space resource with the given name, or null if none exists. |
| public PDColorSpace | Returns: a new color space.Name of the color space resource. name, boolean if current color space was used by a default color space. This parameter is
to wasDefault)Returns the color space resource with the given name, or null if none exists. |
| public Iterable | Returns: an iterable containing all names of available colorspacesReturns the names of the color space resources, if any. |
| public COSDictionary | getCOSObject()
Implements org. Returns the underlying dictionary. |
| public PDExtendedGraphicsState | Returns: the extended graphics state with the given name or nullName of the graphics state resource. name)Returns the extended graphics state resource with the given name, or null if none exists. |
| public Iterable | Returns: an iterable containing all names of available extended graphics statesReturns the names of the extended graphics state resources, if any. |
| public PDFont | |
| public Iterable | Returns: an iterable containing all names of available fontsReturns the names of the font resources, if any. |
| private COSObject | getIndirect(COSName kind, COSName name)
Returns the resource with the given name and kind as an indirect object, or null. |
| private Iterable | |
| public PDAbstractPattern | Returns: the pattern with the given name or nullName of the pattern resource. name)Returns the pattern resource with the given name, or null if none exists. |
| public Iterable | Returns: an iterable containing all names of available patternsReturns the names of the pattern resources, if any. |
| public PDPropertyList | Returns: the property list with the given name or nullName of the property list resource. name)Returns the property list resource with the given name, or null if none exists. |
| public Iterable | Returns: an iterable containing all names of available property listsReturns the names of the property list resources, if any. |
| public ResourceCache | Returns: the resource cache associated with the resources, or nullReturns the resource cache associated with the Resources, or null if there is none. |
| public PDShading | Returns: the shading state with the given name or nullName of the shading resource. name)Returns the shading resource with the given name, or null if none exists. |
| public Iterable | Returns: an iterable containing all names of available shadingsReturns the names of the shading resources, if any. |
| public PDXObject | Returns: the XObject with the given name or nullName of the XObject resource. name)Returns the XObject resource with the given name, or null if none exists. |
| public Iterable | Returns: an iterable containing all names of available xobjectsReturns the names of the XObject resources, if any. |
| public boolean | Returns: true if the given color space name exists in these resources, otherwise falseName of the color space resource. name)Returns true if the given color space name exists in these resources. |
| private boolean | |
| public boolean | Returns: true if it is an image XObject, false if not.Name of the XObject resource. name)Tells whether the XObject resource with the given name is an image. |
| private void | |
| public void | |
| public void | put(COSName
the name of the resource name, PDColorSpace the color space to be added colorSpace)Sets the color space resource with the given name. |
| public void | put(COSName
the name of the resource name, PDExtendedGraphicsState the extended graphics state to be added extGState)Sets the extended graphics state resource with the given name. |
| public void | |
| public void | put(COSName
the name of the resource name, PDAbstractPattern the pattern to be added pattern)Sets the pattern resource with the given name. |
| public void | put(COSName
the name of the resource name, PDPropertyList the property list to be added properties)Sets the property list resource with the given name. |
| public void |
| cache | back to summary |
|---|---|
| private final ResourceCache cache | |
| directFontCache | back to summary |
|---|---|
| private final Map<COSName, SoftReference<PDFont>> directFontCache | |
| resources | back to summary |
|---|---|
| private final COSDictionary resources | |
| PDResources | back to summary |
|---|---|
| public PDResources() Constructor for embedding. | |
| PDResources | back to summary |
|---|---|
| public PDResources(COSDictionary resourceDictionary) Constructor for reading.
| |
| PDResources | back to summary |
|---|---|
| public PDResources(COSDictionary resourceDictionary, ResourceCache resourceCache) Constructor for reading.
| |
| PDResources | back to summary |
|---|---|
| public PDResources(COSDictionary resourceDictionary, ResourceCache resourceCache, Map<COSName, SoftReference<PDFont>> directFontCache) Constructor for reading.
| |
| add | back to summary |
|---|---|
| public COSName add(PDFont font) Adds the given font to the resources of the current page and returns the name for the new resources. Returns the existing resource name if the given item already exists. | |
| add | back to summary |
|---|---|
| public COSName add(PDColorSpace colorSpace) Adds the given color space to the resources of the current page and returns the name for the new resources. Returns the existing resource name if the given item already exists.
| |
| add | back to summary |
|---|---|
| public COSName add(PDExtendedGraphicsState extGState) Adds the given extended graphics state to the resources of the current page and returns the name for the new resources. Returns the existing resource name if the given item already exists.
| |
| add | back to summary |
|---|---|
| public COSName add(PDShading shading) Adds the given shading to the resources of the current page and returns the name for the new resources. Returns the existing resource name if the given item already exists. | |
| add | back to summary |
|---|---|
| public COSName add(PDAbstractPattern pattern) Adds the given pattern to the resources of the current page and returns the name for the new resources. Returns the existing resource name if the given item already exists.
| |
| add | back to summary |
|---|---|
| public COSName add(PDPropertyList properties) Adds the given property list to the resources of the current page and returns the name for the new resources. Returns the existing resource name if the given item already exists.
| |
| add | back to summary |
|---|---|
| public COSName add(PDImageXObject image) Adds the given image to the resources of the current page and returns the name for the new resources. Returns the existing resource name if the given item already exists.
| |
| add | back to summary |
|---|---|
| public COSName add(PDFormXObject form) Adds the given form to the resources of the current page and returns the name for the new resources. Returns the existing resource name if the given item already exists.
| |
| add | back to summary |
|---|---|
| public COSName add(PDXObject xobject, String prefix) Adds the given XObject to the resources of the current page and returns the name for the new resources. Returns the existing resource name if the given item already exists. | |
| add | back to summary |
|---|---|
| private COSName add(COSName kind, String prefix, COSObjectable object) Adds the given resource if it does not already exist. | |
| createKey | back to summary |
|---|---|
| private COSName createKey(COSName kind, String prefix) Returns a unique key for a new resource. | |
| get | back to summary |
|---|---|
| private COSBase get(COSName kind, COSName name) Returns the resource with the given name and kind, or null. | |
| getColorSpace | back to summary |
|---|---|
| public PDColorSpace getColorSpace(COSName name) throws IOException Returns the color space resource with the given name, or null if none exists.
| |
| getColorSpace | back to summary |
|---|---|
| public PDColorSpace getColorSpace(COSName name, boolean wasDefault) throws IOException Returns the color space resource with the given name, or null if none exists. This method is
for PDFBox internal use only, others should use
| |
| getColorSpaceNames | back to summary |
|---|---|
| public Iterable Returns the names of the color space resources, if any. | |
| getCOSObject | back to summary |
|---|---|
| public COSDictionary getCOSObject() Implements org. Returns the underlying dictionary.
| |
| getExtGState | back to summary |
|---|---|
| public PDExtendedGraphicsState getExtGState(COSName name) Returns the extended graphics state resource with the given name, or null if none exists.
| |
| getExtGStateNames | back to summary |
|---|---|
| public Iterable Returns the names of the extended graphics state resources, if any. | |
| getFont | back to summary |
|---|---|
| public PDFont getFont(COSName name) throws IOException Returns the font resource with the given name, or null if none exists.
| |
| getFontNames | back to summary |
|---|---|
| public Iterable Returns the names of the font resources, if any. | |
| getIndirect | back to summary |
|---|---|
| private COSObject getIndirect(COSName kind, COSName name) Returns the resource with the given name and kind as an indirect object, or null. | |
| getNames | back to summary |
|---|---|
| private Iterable Returns the resource names of the given kind. | |
| getPattern | back to summary |
|---|---|
| public PDAbstractPattern getPattern(COSName name) throws IOException Returns the pattern resource with the given name, or null if none exists.
| |
| getPatternNames | back to summary |
|---|---|
| public Iterable Returns the names of the pattern resources, if any. | |
| getProperties | back to summary |
|---|---|
| public PDPropertyList getProperties(COSName name) Returns the property list resource with the given name, or null if none exists.
| |
| getPropertiesNames | back to summary |
|---|---|
| public Iterable Returns the names of the property list resources, if any. | |
| getResourceCache | back to summary |
|---|---|
| public ResourceCache getResourceCache() Returns the resource cache associated with the Resources, or null if there is none.
| |
| getShading | back to summary |
|---|---|
| public PDShading getShading(COSName name) throws IOException Returns the shading resource with the given name, or null if none exists.
| |
| getShadingNames | back to summary |
|---|---|
| public Iterable Returns the names of the shading resources, if any. | |
| getXObject | back to summary |
|---|---|
| public PDXObject getXObject(COSName name) throws IOException Returns the XObject resource with the given name, or null if none exists.
| |
| getXObjectNames | back to summary |
|---|---|
| public Iterable Returns the names of the XObject resources, if any. | |
| hasColorSpace | back to summary |
|---|---|
| public boolean hasColorSpace(COSName name) Returns true if the given color space name exists in these resources.
| |
| isAllowedCache | back to summary |
|---|---|
| private boolean isAllowedCache(PDXObject xobject) | |
| isImageXObject | back to summary |
|---|---|
| public boolean isImageXObject(COSName name) Tells whether the XObject resource with the given name is an image.
| |
| put | back to summary |
|---|---|
| private void put(COSName kind, COSName name, COSObjectable object) Sets the value of a given named resource. | |
| put | back to summary |
|---|---|
| public void put(COSName name, PDFont font) Sets the font resource with the given name. | |
| put | back to summary |
|---|---|
| public void put(COSName name, PDColorSpace colorSpace) Sets the color space resource with the given name.
| |
| put | back to summary |
|---|---|
| public void put(COSName name, PDExtendedGraphicsState extGState) Sets the extended graphics state resource with the given name.
| |
| put | back to summary |
|---|---|
| public void put(COSName name, PDShading shading) Sets the shading resource with the given name. | |
| put | back to summary |
|---|---|
| public void put(COSName name, PDAbstractPattern pattern) Sets the pattern resource with the given name.
| |
| put | back to summary |
|---|---|
| public void put(COSName name, PDPropertyList properties) Sets the property list resource with the given name.
| |
| put | back to summary |
|---|---|
| public void put(COSName name, PDXObject xobject) Sets the XObject resource with the given name. | |