public class PDResources extends java.lang.Object implements COSObjectable
Constructor and Description |
---|
PDResources()
Default constructor.
|
PDResources(COSDictionary resourceDictionary)
Prepopulated resources.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map |
getColorSpaces()
This will get the map of colorspaces.
|
COSDictionary |
getCOSDictionary()
This will get the underlying dictionary.
|
COSBase |
getCOSObject()
Convert this standard java object to a COS object.
|
java.util.Map |
getFonts()
This will get the map of fonts.
|
java.util.Map |
getFonts(java.util.Map fontCache)
This will get the map of fonts.
|
java.util.Map |
getGraphicsStates()
This will get the map of graphic states.
|
java.util.Map |
getImages()
This will get the map of images.
|
PDPropertyList |
getProperties()
Returns the dictionary mapping resource names to property list dictionaries for marked
content.
|
java.util.Map |
getXObjects()
This will get the map of PDXObjects that are in the resource dictionary.
|
void |
setColorSpaces(java.util.Map colorspaces)
This will set the map of colorspaces.
|
void |
setFonts(java.util.Map fonts)
This will set the map of fonts.
|
void |
setGraphicsStates(java.util.Map states)
This will set the map of graphics states.
|
void |
setProperties(PDPropertyList props)
Sets the dictionary mapping resource names to property list dictionaries for marked
content.
|
public PDResources()
public PDResources(COSDictionary resourceDictionary)
resourceDictionary
- The cos dictionary for this resource.public COSDictionary getCOSDictionary()
public COSBase getCOSObject()
getCOSObject
in interface COSObjectable
public java.util.Map getFonts(java.util.Map fontCache) throws java.io.IOException
fontCache
- A map of existing PDFont objects to reuse.java.io.IOException
- If there is an error getting the fonts.public java.util.Map getFonts() throws java.io.IOException
java.io.IOException
- If there is an error getting the fonts.public java.util.Map getXObjects() throws java.io.IOException
java.io.IOException
- If there is an error creating the xobjects.public java.util.Map getImages() throws java.io.IOException
java.io.IOException
- If there is an error writing the picture.public void setFonts(java.util.Map fonts)
fonts
- The new map of fonts.public java.util.Map getColorSpaces() throws java.io.IOException
java.io.IOException
- If there is an error getting the colorspaces.public void setColorSpaces(java.util.Map colorspaces)
colorspaces
- The new map of colorspaces.public java.util.Map getGraphicsStates()
public void setGraphicsStates(java.util.Map states)
states
- The new map of states.public PDPropertyList getProperties()
public void setProperties(PDPropertyList props)
props
- the property list