org.apache.fop.pdf
Class PDFResources
- PDFWritable
public class PDFResources
class representing a /Resources object.
/Resources object contain a list of references to the fonts for the
document
protected Map | colorSpaces - Map of color spaces (key: color space name)
|
protected Map | fonts - /Font objects keyed by their internal name
|
protected Set | gstates - Set of ExtGStates
|
protected Map | iccColorSpaces - Map of ICC color spaces (key: ICC profile description)
|
protected Set | patterns - Set of patterns
|
protected Set | shadings - Set of shadings
|
protected Set | xObjects - Set of XObjects
|
encode , encodeBinaryToHexString , encodeString , encodeText , formatDateTime , formatDateTime , formatObject , getDocument , getDocumentSafely , getGeneration , getObjectID , getObjectNumber , getParent , hasObjectNumber , makeReference , output , outputInline , referencePDF , setDocument , setObjectNumber , setParent , toPDF , toPDFString |
colorSpaces
protected Map colorSpaces
Map of color spaces (key: color space name)
fonts
protected Map fonts
/Font objects keyed by their internal name
gstates
protected Set gstates
Set of ExtGStates
iccColorSpaces
protected Map iccColorSpaces
Map of ICC color spaces (key: ICC profile description)
patterns
protected Set patterns
Set of patterns
shadings
protected Set shadings
Set of shadings
xObjects
protected Set xObjects
Set of XObjects
PDFResources
public PDFResources(int objnum)
create a /Resources object.
objnum
- the object's number
addColorSpace
public void addColorSpace(PDFICCBasedColorSpace colorSpace)
Add a ColorSpace dictionary to the resources.
colorSpace
- the color space
addFont
public void addFont(PDFFont font)
add font object to resources list.
font
- the PDFFont to add
addFonts
public void addFonts(PDFDocument doc,
FontInfo fontInfo)
Add the fonts in the font info to this PDF document's Font Resources.
doc
- PDF document to add fonts tofontInfo
- font info object to get font information from
addGState
public void addGState(PDFGState gs)
Add a PDFGState to the resources.
gs
- the PDFGState to add
addPattern
public void addPattern(PDFPattern thePattern)
Add the pattern to the resources.
thePattern
- the pattern to add
addShading
public void addShading(PDFShading theShading)
Add a Shading to the resources.
theShading
- the shading to add
addXObject
public void addXObject(PDFXObject xObject)
Add an XObject to the resources.
xObject
- the XObject to add
getColorSpace
public PDFICCBasedColorSpace getColorSpace(String name)
Returns a color space by name.
name
- the name of the color space
- the requested color space or null if it wasn't found
getICCColorSpaceByProfileName
public PDFICCBasedColorSpace getICCColorSpaceByProfileName(String desc)
Returns a ICCBased color space by profile name.
desc
- the name of the color space
- the requested color space or null if it wasn't found
toPDFString
public String toPDFString()
represent the object in PDF
This adds the references to all the objects in the current
resource context.
- toPDFString in interface PDFObject
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.