public class PDFResources extends PDFDictionary
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<PDFName,PDFColorSpace> |
colorSpaces
Map of color spaces (key: color space name)
|
protected java.util.Map<java.lang.String,PDFFont> |
fonts
/Font objects keyed by their internal name
|
protected java.util.Set<PDFGState> |
gstates
Set of ExtGStates
|
protected java.util.Map<java.lang.String,PDFICCBasedColorSpace> |
iccColorSpaces
Map of ICC color spaces (key: ICC profile description)
|
protected java.util.Set<PDFPattern> |
patterns
Set of patterns
|
protected java.util.Set<PDFShading> |
shadings
Set of shadings
|
protected java.util.Set<PDFXObject> |
xObjects
Set of XObjects
|
entries, order
Constructor and Description |
---|
PDFResources(int objnum)
create a /Resources object.
|
Modifier and Type | Method and Description |
---|---|
void |
addColorSpace(PDFColorSpace colorSpace)
Add a ColorSpace dictionary to the resources.
|
void |
addFont(PDFFont font)
add font object to resources list.
|
void |
addFonts(PDFDocument doc,
FontInfo fontInfo)
Add the fonts in the font info to this PDF document's Font Resources.
|
void |
addGState(PDFGState gs)
Add a PDFGState to the resources.
|
void |
addPattern(PDFPattern thePattern)
Add the pattern to the resources.
|
void |
addShading(PDFShading theShading)
Add a Shading to the resources.
|
void |
addXObject(PDFXObject xObject)
Add an XObject to the resources.
|
PDFColorSpace |
getColorSpace(PDFName name)
Returns a color space by name.
|
PDFICCBasedColorSpace |
getICCColorSpaceByProfileName(java.lang.String desc)
Returns a ICCBased color space by profile name.
|
int |
output(java.io.OutputStream stream)
Write the PDF represention of this object
|
get, put, put, writeDictionary
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, outputInline, referencePDF, setDocument, setObjectNumber, setParent, toPDF, toPDFString
protected java.util.Map<java.lang.String,PDFFont> fonts
protected java.util.Set<PDFXObject> xObjects
protected java.util.Set<PDFPattern> patterns
protected java.util.Set<PDFShading> shadings
protected java.util.Set<PDFGState> gstates
protected java.util.Map<PDFName,PDFColorSpace> colorSpaces
protected java.util.Map<java.lang.String,PDFICCBasedColorSpace> iccColorSpaces
public PDFResources(int objnum)
objnum
- the object's numberpublic void addFont(PDFFont font)
font
- the PDFFont to addpublic void addFonts(PDFDocument doc, FontInfo fontInfo)
doc
- PDF document to add fonts tofontInfo
- font info object to get font information frompublic void addGState(PDFGState gs)
gs
- the PDFGState to addpublic void addShading(PDFShading theShading)
theShading
- the shading to addpublic void addPattern(PDFPattern thePattern)
thePattern
- the pattern to addpublic void addXObject(PDFXObject xObject)
xObject
- the XObject to addpublic void addColorSpace(PDFColorSpace colorSpace)
colorSpace
- the color spacepublic PDFICCBasedColorSpace getICCColorSpaceByProfileName(java.lang.String desc)
desc
- the name of the color spacepublic PDFColorSpace getColorSpace(PDFName name)
name
- the name of the color spacepublic int output(java.io.OutputStream stream) throws java.io.IOException
PDFDictionary
output
in class PDFDictionary
stream
- the stream to write the PDF tojava.io.IOException
- if there is an error writing to the streamCopyright 1999-2012 The Apache Software Foundation. All Rights Reserved.