fop 1.1

## org.apache.fop.pdf
Class PDFFactory

    java.lang.Object
      org.apache.fop.pdf.PDFFactory

    public class PDFFactory

extends java.lang.Object

This class provides method to create and register PDF objects.

Field Summary
`static int` `DEFAULT_PDF_RESOLUTION` Resolution of the User Space coordinate system (72dpi).

Constructor Summary
`PDFFactory(PDFDocument document)` Creates a new PDFFactory.

Method Summary
`java.lang.Object` `createPDFEncoding(SingleByteEncoding encoding, java.lang.String fontNameHint)` Creates a PDFEncoding instance from a CodePointMapping instance.
`PDFDocument` `getDocument()` Returns the parent PDFDocument associated with this factory.
`PDFAction` `getExternalAction(java.lang.String target, boolean newWindow)` Create/find and return the appropriate external PDFAction according to the target
`java.lang.String` `getGoToReference(java.lang.String pdfPageRef, float yoffset)` Create or find a PDF GoTo with the given page reference string and Y offset, and return its PDF object reference
`PDFGoTo` `getPDFGoTo(java.lang.String pdfPageRef, java.awt.geom.Point2D position)` Finds and returns a PDFGoTo to the given page and position.
`PDFWArray` `getSubsetWidths(CIDFont cidFont)` Creates and returns a width array with the widths of all the characters in the subset.
`protected PDFDestination` `getUniqueDestination(PDFDestination newdest)` Registers and returns newdest if it is unique.
`PDFAnnotList` `makeAnnotList()` Make an annotation list object
`PDFArray` `makeArray(int[] values)` Make an Array object (ex.
`PDFDestination` `makeDestination(java.lang.String idRef, java.lang.Object goToRef)` Make a named destination.
`PDFDests` `makeDests(java.util.List destinationList)` Make a the head object of the name dictionary (the /Dests object).
`PDFEncoding` `makeEncoding(java.lang.String encodingName)` make a /Encoding object
`PDFFont` `makeFont(java.lang.String fontname, java.lang.String basefont, java.lang.String encoding, FontMetrics metrics, FontDescriptor descriptor)` Make a Type1 /Font object.
`AbstractPDFStream` `makeFontFile(FontDescriptor desc)` Embeds a font.
`PDFFunction` `makeFunction(int theNumber, int theFunctionType, java.util.List theDomain, java.util.List theRange, java.lang.StringBuffer theFunctionDataStream)` make a postscript calculator function
`PDFFunction` `makeFunction(int theFunctionType, java.util.List theDomain, java.util.List theRange, java.util.List theSize, int theBitsPerSample, int theOrder, java.util.List theEncode, java.util.List theDecode, java.lang.StringBuffer theFunctionDataStream, java.util.List theFilter)` Make a Type 0 sampled function
`PDFFunction` `makeFunction(int theFunctionType, java.util.List theDomain, java.util.List theRange, java.util.List theCZero, java.util.List theCOne, double theInterpolationExponentN)` make a type Exponential interpolation function (for shading usually)
`PDFFunction` `makeFunction(int theFunctionType, java.util.List theDomain, java.util.List theRange, java.util.List theFunctions, java.util.List theBounds, java.util.List theEncode)` Make a Type 3 Stitching function
`PDFPattern` `makeGradient(PDFResourceContext res, boolean radial, PDFDeviceColorSpace theColorspace, java.util.List theColors, java.util.List theBounds, java.util.List theCoords, java.util.List theMatrix)` Make a gradient
`PDFGState` `makeGState(java.util.Map settings, PDFGState current)` make an ExtGState for extra graphics options This tries to find a GState that will setup the correct values for the current context.
`PDFICCBasedColorSpace` `makeICCBasedColorSpace(PDFResourceContext res, java.lang.String explicitName, PDFICCStream iccStream)` Makes a new ICCBased color space and registers it in the resource context.
`protected PDFInfo` `makeInfo(java.lang.String prod)` make an /Info object
`PDFLink` `makeLink(java.awt.geom.Rectangle2D rect, PDFAction pdfAction)` Create a PDF link to an existing PDFAction object
`PDFLink` `makeLink(java.awt.geom.Rectangle2D rect, java.lang.String destination, int linkType, float yoffset)` Make a `PDFLink` object
`PDFLink` `makeLink(java.awt.geom.Rectangle2D rect, java.lang.String page, java.lang.String dest)` Make an internal link.
`PDFMetadata` `makeMetadata(org.apache.xmlgraphics.xmp.Metadata meta, boolean readOnly)` Make a Metadata object.
`PDFNames` `makeNames()` Make a names dictionary (the /Names object).
`PDFNameTreeNode` `makeNameTreeNode()` Make a name tree node.
`PDFOutline` `makeOutline(PDFOutline parent, java.lang.String label, PDFAction pdfAction, boolean showSubItems)` Make an outline object and add it to the given parent
`PDFOutline` `makeOutline(PDFOutline parent, java.lang.String label, java.lang.String actionRef, boolean showSubItems)` Make an outline object and add it to the given parent
`PDFOutline` `makeOutline(PDFOutline parent, java.lang.String label, java.lang.String destination, float yoffset, boolean showSubItems)` Make an outline object and add it to the given outline
`PDFOutputIntent` `makeOutputIntent()` Make a OutputIntent dictionary.
`PDFPage` `makePage(PDFResources resources, int pageWidth, int pageHeight)` Make a /Page object.
`PDFPage` `makePage(PDFResources resources, int pageWidth, int pageHeight, int pageIndex)` Make a /Page object.
`PDFPage` `makePage(PDFResources resources, int pageIndex, java.awt.geom.Rectangle2D mediaBox, java.awt.geom.Rectangle2D cropBox, java.awt.geom.Rectangle2D bleedBox, java.awt.geom.Rectangle2D trimBox)` Make a /Page object.
`PDFPageLabels` `makePageLabels()` Make a names dictionary (the /PageLabels object).
`PDFPages` `makePages()` Make a /Pages object.
`PDFPattern` `makePattern(PDFResourceContext res, int thePatternType, PDFResources theResources, int thePaintType, int theTilingType, java.util.List theBBox, double theXStep, double theYStep, java.util.List theMatrix, java.util.List theXUID, java.lang.StringBuffer thePatternDataStream)` Make a tiling pattern
`PDFPattern` `makePattern(PDFResourceContext res, int thePatternType, PDFShading theShading, java.util.List theXUID, java.lang.StringBuffer theExtGState, java.util.List theMatrix)` Make a smooth shading pattern
`PDFICCStream` `makePDFICCStream()` Create a PDFICCStream
`PDFResources` `makeResources()` Make a /Resources object.
`PDFRoot` `makeRoot(PDFPages pages)` Make a /Catalog (Root) object.
`PDFSeparationColorSpace` `makeSeparationColorSpace(PDFResourceContext res, org.apache.xmlgraphics.java2d.color.NamedColorSpace ncs)` Create a new Separation color space.

`PDFShading`

`makeShading(PDFResourceContext res, int theShadingType, PDFDeviceColorSpace theColorSpace, java.util.List theBackground, java.util.List theBBox, boolean theAntiAlias, int theBitsPerCoordinate, int theBitsPerComponent, int theBitsPerFlag, java.util.List theDecode, PDFFunction theFunction)`
Make a free-form gouraud shaded triangle mesh, coons patch mesh, or tensor patch mesh shading object

`PDFShading` `makeShading(PDFResourceContext res, int theShadingType, PDFDeviceColorSpace theColorSpace, java.util.List theBackground, java.util.List theBBox, boolean theAntiAlias, int theBitsPerCoordinate, int theBitsPerComponent, java.util.List theDecode, int theVerticesPerRow, PDFFunction theFunction)` make a Lattice-Form Gouraud mesh shading object
`PDFShading` `makeShading(PDFResourceContext res, int theShadingType, PDFDeviceColorSpace theColorSpace, java.util.List theBackground, java.util.List theBBox, boolean theAntiAlias, java.util.List theDomain, java.util.List theMatrix, PDFFunction theFunction)` make a function based shading object
`PDFShading` `makeShading(PDFResourceContext res, int theShadingType, PDFDeviceColorSpace theColorSpace, java.util.List theBackground, java.util.List theBBox, boolean theAntiAlias, java.util.List theCoords, java.util.List theDomain, PDFFunction theFunction, java.util.List theExtend)` Make an axial or radial shading object.
`PDFStream` `makeStream(java.lang.String type, boolean add)` Make a stream object

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_PDF_RESOLUTION

    public static final int DEFAULT_PDF_RESOLUTION

  Resolution of the User Space coordinate system (72dpi).

  See Also:
    Constant Field Values

Constructor Detail

### PDFFactory

    public PDFFactory(PDFDocument document)

  Creates a new PDFFactory.

  Parameters:
    `document` - the parent PDFDocument needed to register the generated objects

Method Detail

### getDocument

    public final PDFDocument getDocument()

  Returns the parent PDFDocument associated with this factory.

  Returns:
    PDFDocument the parent PDFDocument

### makeRoot

    public PDFRoot makeRoot(PDFPages pages)

  Make a /Catalog (Root) object. This object is written in the trailer.

  Parameters:
    `pages` - the pages pdf object that the root points to
  Returns:
    the new pdf root object for this document

### makePages

    public PDFPages makePages()

  Make a /Pages object. This object is written in the trailer.

  Returns:
    a new PDF Pages object for adding pages to

### makeResources

    public PDFResources makeResources()

  Make a /Resources object. This object is written in the trailer.

  Returns:
    a new PDF resources object

### makeInfo

    protected PDFInfo makeInfo(java.lang.String prod)

  make an /Info object

  Parameters:
    `prod` - string indicating application producing the PDF
  Returns:
    the created /Info object

### makeMetadata

    public PDFMetadata makeMetadata(org.apache.xmlgraphics.xmp.Metadata meta,
                                    boolean readOnly)

  Make a Metadata object.

  Parameters:
    `meta` - the DOM Document containing the XMP metadata.
    `readOnly` - true if the metadata packet should be marked read-only
  Returns:
    the newly created Metadata object

### makeOutputIntent

    public PDFOutputIntent makeOutputIntent()

  Make a OutputIntent dictionary.

  Returns:
    the newly created OutputIntent dictionary

### makePage

    public PDFPage makePage(PDFResources resources,
                            int pageIndex,
                            java.awt.geom.Rectangle2D mediaBox,
                            java.awt.geom.Rectangle2D cropBox,
                            java.awt.geom.Rectangle2D bleedBox,
                            java.awt.geom.Rectangle2D trimBox)

  Make a /Page object. The page is assigned an object number immediately so references can already be made. The page must be added to the PDFDocument later using addObject().

  Parameters:
    `resources` - resources object to use
    `pageIndex` - index of the page (zero-based)
    `mediaBox` - the MediaBox area
    `cropBox` - the CropBox area
    `bleedBox` - the BleedBox area
    `trimBox` - the TrimBox area
  Returns:
    the created /Page object

### makePage

    public PDFPage makePage(PDFResources resources,
                            int pageWidth,
                            int pageHeight,
                            int pageIndex)

  Make a /Page object. The page is assigned an object number immediately so references can already be made. The page must be added to the PDFDocument later using addObject().

  Parameters:
    `resources` - resources object to use
    `pageWidth` - width of the page in points
    `pageHeight` - height of the page in points
    `pageIndex` - index of the page (zero-based)
  Returns:
    the created /Page object

### makePage

    public PDFPage makePage(PDFResources resources,
                            int pageWidth,
                            int pageHeight)

  Make a /Page object. The page is assigned an object number immediately so references can already be made. The page must be added to the PDFDocument later using addObject().

  Parameters:
    `resources` - resources object to use
    `pageWidth` - width of the page in points
    `pageHeight` - height of the page in points
  Returns:
    the created /Page object

### makeFunction

    public PDFFunction makeFunction(int theFunctionType,
                                    java.util.List theDomain,
                                    java.util.List theRange,
                                    java.util.List theSize,
                                    int theBitsPerSample,
                                    int theOrder,
                                    java.util.List theEncode,
                                    java.util.List theDecode,
                                    java.lang.StringBuffer theFunctionDataStream,
                                    java.util.List theFilter)

  Make a Type 0 sampled function

  Parameters:
    `theDomain` - List objects of Double objects. This is the domain of the function. See page 264 of the PDF 1.3 Spec.
    `theRange` - List objects of Double objects. This is the Range of the function. See page 264 of the PDF 1.3 Spec.
    `theSize` - A List object of Integer objects. This is the number of samples in each input dimension. I can't imagine there being more or less than two input dimensions, so maybe this should be an array of length 2. See page 265 of the PDF 1.3 Spec.
    `theBitsPerSample` - An int specifying the number of bits user to represent each sample value. Limited to 1,2,4,8,12,16,24 or 32. See page 265 of the 1.3 PDF Spec.
    `theOrder` - The order of interpolation between samples. Default is 1 (one). Limited to 1 (one) or 3, which means linear or cubic-spline interpolation. This attribute is optional. See page 265 in the PDF 1.3 spec.
    `theEncode` - List objects of Double objects. This is the linear mapping of input values intop the domain of the function's sample table. Default is hard to represent in ascii, but basically [0 (Size0 1) 0 (Size1 1)...]. This attribute is optional. See page 265 in the PDF 1.3 spec.
    `theDecode` - List objects of Double objects. This is a linear mapping of sample values into the range. The default is just the range. This attribute is optional. Read about it on page 265 of the PDF 1.3 spec.
    `theFunctionDataStream` - The sample values that specify the function are provided in a stream. This is optional, but is almost always used. Page 265 of the PDF 1.3 spec has more.
    `theFilter` - This is a vector of String objects which are the various filters that have are to be applied to the stream to make sense of it. Order matters, so watch out. This is not documented in the Function section of the PDF 1.3 spec, it was deduced from samples that this is sometimes used, even if we may never use it in FOP. It is added for completeness sake.
    `theFunctionType` - This is the type of function (0,2,3, or 4). It should be 0 as this is the constructor for sampled functions.
  Returns:
    the PDF function that was created

### makeFunction

    public PDFFunction makeFunction(int theFunctionType,
                                    java.util.List theDomain,
                                    java.util.List theRange,
                                    java.util.List theCZero,
                                    java.util.List theCOne,
                                    double theInterpolationExponentN)

  make a type Exponential interpolation function (for shading usually)

  Parameters:
    `theDomain` - List objects of Double objects. This is the domain of the function. See page 264 of the PDF 1.3 Spec.
    `theRange` - List of Doubles that is the Range of the function. See page 264 of the PDF 1.3 Spec.
    `theCZero` - This is a vector of Double objects which defines the function result when x=0. This attribute is optional. It's described on page 268 of the PDF 1.3 spec.
    `theCOne` - This is a vector of Double objects which defines the function result when x=1. This attribute is optional. It's described on page 268 of the PDF 1.3 spec.
    `theInterpolationExponentN` - This is the inerpolation exponent. This attribute is required. PDF Spec page 268
    `theFunctionType` - The type of the function, which should be 2.
  Returns:
    the PDF function that was created

### makeFunction

    public PDFFunction makeFunction(int theFunctionType,
                                    java.util.List theDomain,
                                    java.util.List theRange,
                                    java.util.List theFunctions,
                                    java.util.List theBounds,
                                    java.util.List theEncode)

  Make a Type 3 Stitching function

  Parameters:
    `theDomain` - List objects of Double objects. This is the domain of the function. See page 264 of the PDF 1.3 Spec.
    `theRange` - List objects of Double objects. This is the Range of the function. See page 264 of the PDF 1.3 Spec.
    `theFunctions` - An List of the PDFFunction objects that the stitching function stitches. This attributed is required. It is described on page 269 of the PDF spec.
    `theBounds` - This is a vector of Doubles representing the numbers that, in conjunction with Domain define the intervals to which each function from the 'functions' object applies. It must be in order of increasing magnitude, and each must be within Domain. It basically sets how much of the gradient each function handles. This attributed is required. It's described on page 269 of the PDF 1.3 spec.
    `theEncode` - List objects of Double objects. This is the linear mapping of input values intop the domain of the function's sample table. Default is hard to represent in ascii, but basically [0 (Size0 1) 0 (Size1 1)...]. This attribute is required. See page 270 in the PDF 1.3 spec.
    `theFunctionType` - This is the function type. It should be 3, for a stitching function.
  Returns:
    the PDF function that was created

### makeFunction

    public PDFFunction makeFunction(int theNumber,
                                    int theFunctionType,
                                    java.util.List theDomain,
                                    java.util.List theRange,
                                    java.lang.StringBuffer theFunctionDataStream)

  make a postscript calculator function

  Parameters:
    `theNumber` - the PDF object number
    `theFunctionType` - the type of function to make
    `theDomain` - the domain values
    `theRange` - the range values of the function
    `theFunctionDataStream` - a string containing the pdf drawing
  Returns:
    the PDF function that was created

### makeShading

    public PDFShading makeShading(PDFResourceContext res,
                                  int theShadingType,
                                  PDFDeviceColorSpace theColorSpace,
                                  java.util.List theBackground,
                                  java.util.List theBBox,
                                  boolean theAntiAlias,
                                  java.util.List theDomain,
                                  java.util.List theMatrix,
                                  PDFFunction theFunction)

  make a function based shading object

  Parameters:
    `res` - the PDF resource context to add the shading, may be null
    `theShadingType` - The type of shading object, which should be 1 for function based shading.
    `theColorSpace` - The colorspace is 'DeviceRGB' or something similar.
    `theBackground` - An array of color components appropriate to the colorspace key specifying a single color value. This key is used by the f operator buy ignored by the sh operator.
    `theBBox` - List of double's representing a rectangle in the coordinate space that is current at the time of shading is imaged. Temporary clipping boundary.
    `theAntiAlias` - Whether or not to anti-alias.
    `theDomain` - Optional vector of Doubles specifying the domain.
    `theMatrix` - List of Doubles specifying the matrix. If it's a pattern, then the matrix maps it to pattern space. If it's a shading, then it maps it to current user space. It's optional, the default is the identity matrix
    `theFunction` - The PDF Function that maps an (x,y) location to a color
  Returns:
    the PDF shading that was created

### makeShading

    public PDFShading makeShading(PDFResourceContext res,
                                  int theShadingType,
                                  PDFDeviceColorSpace theColorSpace,
                                  java.util.List theBackground,
                                  java.util.List theBBox,
                                  boolean theAntiAlias,
                                  java.util.List theCoords,
                                  java.util.List theDomain,
                                  PDFFunction theFunction,
                                  java.util.List theExtend)

  Make an axial or radial shading object.

  Parameters:
    `res` - the PDF resource context to add the shading, may be null
    `theShadingType` - 2 or 3 for axial or radial shading
    `theColorSpace` - "DeviceRGB" or similar.
    `theBackground` - theBackground An array of color components appropriate to the colorspace key specifying a single color value. This key is used by the f operator buy ignored by the sh operator.
    `theBBox` - List of double's representing a rectangle in the coordinate space that is current at the time of shading is imaged. Temporary clipping boundary.
    `theAntiAlias` - Default is false
    `theCoords` - List of four (type 2) or 6 (type 3) Double
    `theDomain` - List of Doubles specifying the domain
    `theFunction` - the Stitching (PDFfunction type 3) function, even if it's stitching a single function
    `theExtend` - List of Booleans of whether to extend the start and end colors past the start and end points The default is [false, false]
  Returns:
    the PDF shading that was created

### makeShading

    public PDFShading makeShading(PDFResourceContext res,
                                  int theShadingType,
                                  PDFDeviceColorSpace theColorSpace,
                                  java.util.List theBackground,
                                  java.util.List theBBox,
                                  boolean theAntiAlias,
                                  int theBitsPerCoordinate,
                                  int theBitsPerComponent,
                                  int theBitsPerFlag,
                                  java.util.List theDecode,
                                  PDFFunction theFunction)

  Make a free-form gouraud shaded triangle mesh, coons patch mesh, or tensor patch mesh shading object

  Parameters:
    `res` - the PDF resource context to add the shading, may be null
    `theShadingType` - 4, 6, or 7 depending on whether it's Free-form gouraud-shaded triangle meshes, coons patch meshes, or tensor product patch meshes, respectively.
    `theColorSpace` - "DeviceRGB" or similar.
    `theBackground` - theBackground An array of color components appropriate to the colorspace key specifying a single color value. This key is used by the f operator buy ignored by the sh operator.
    `theBBox` - List of double's representing a rectangle in the coordinate space that is current at the time of shading is imaged. Temporary clipping boundary.
    `theAntiAlias` - Default is false
    `theBitsPerCoordinate` - 1,2,4,8,12,16,24 or 32.
    `theBitsPerComponent` - 1,2,4,8,12, and 16
    `theBitsPerFlag` - 2,4,8.
    `theDecode` - List of Doubles see PDF 1.3 spec pages 303 to 312.
    `theFunction` - the PDFFunction
  Returns:
    the PDF shading that was created

### makeShading

    public PDFShading makeShading(PDFResourceContext res,
                                  int theShadingType,
                                  PDFDeviceColorSpace theColorSpace,
                                  java.util.List theBackground,
                                  java.util.List theBBox,
                                  boolean theAntiAlias,
                                  int theBitsPerCoordinate,
                                  int theBitsPerComponent,
                                  java.util.List theDecode,
                                  int theVerticesPerRow,
                                  PDFFunction theFunction)

  make a Lattice-Form Gouraud mesh shading object

  Parameters:
    `res` - the PDF resource context to add the shading, may be null
    `theShadingType` - 5 for lattice-Form Gouraud shaded-triangle mesh without spaces. "Shading1" or "Sh1" are good examples.
    `theColorSpace` - "DeviceRGB" or similar.
    `theBackground` - theBackground An array of color components appropriate to the colorspace key specifying a single color value. This key is used by the f operator buy ignored by the sh operator.
    `theBBox` - List of double's representing a rectangle in the coordinate space that is current at the time of shading is imaged. Temporary clipping boundary.
    `theAntiAlias` - Default is false
    `theBitsPerCoordinate` - 1,2,4,8,12,16, 24, or 32
    `theBitsPerComponent` - 1,2,4,8,12,24,32
    `theDecode` - List of Doubles. See page 305 in PDF 1.3 spec.
    `theVerticesPerRow` - number of vertices in each "row" of the lattice.
    `theFunction` - The PDFFunction that's mapped on to this shape
  Returns:
    the PDF shading that was created

### makePattern

    public PDFPattern makePattern(PDFResourceContext res,
                                  int thePatternType,
                                  PDFResources theResources,
                                  int thePaintType,
                                  int theTilingType,
                                  java.util.List theBBox,
                                  double theXStep,
                                  double theYStep,
                                  java.util.List theMatrix,
                                  java.util.List theXUID,
                                  java.lang.StringBuffer thePatternDataStream)

  Make a tiling pattern

  Parameters:
    `res` - the PDF resource context to add the shading, may be null
    `thePatternType` - the type of pattern, which is 1 for tiling.
    `theResources` - the resources associated with this pattern
    `thePaintType` - 1 or 2, colored or uncolored.
    `theTilingType` - 1, 2, or 3, constant spacing, no distortion, or faster tiling
    `theBBox` - List of Doubles: The pattern cell bounding box
    `theXStep` - horizontal spacing
    `theYStep` - vertical spacing
    `theMatrix` - Optional List of Doubles transformation matrix
    `theXUID` - Optional vector of Integers that uniquely identify the pattern
    `thePatternDataStream` - The stream of pattern data to be tiled.
  Returns:
    the PDF pattern that was created

### makePattern

    public PDFPattern makePattern(PDFResourceContext res,
                                  int thePatternType,
                                  PDFShading theShading,
                                  java.util.List theXUID,
                                  java.lang.StringBuffer theExtGState,
                                  java.util.List theMatrix)

  Make a smooth shading pattern

  Parameters:
    `res` - the PDF resource context to add the shading, may be null
    `thePatternType` - the type of the pattern, which is 2, smooth shading
    `theShading` - the PDF Shading object that comprises this pattern
    `theXUID` - optional:the extended unique Identifier if used.
    `theExtGState` - optional: the extended graphics state, if used.
    `theMatrix` - Optional:List of Doubles that specify the matrix.
  Returns:
    the PDF pattern that was created

### makeGradient

    public PDFPattern makeGradient(PDFResourceContext res,
                                   boolean radial,
                                   PDFDeviceColorSpace theColorspace,
                                   java.util.List theColors,
                                   java.util.List theBounds,
                                   java.util.List theCoords,
                                   java.util.List theMatrix)

  Make a gradient

  Parameters:
    `res` - the PDF resource context to add the shading, may be null
    `radial` - if true a radial gradient will be created
    `theColorspace` - the colorspace of the gradient
    `theColors` - the list of colors for the gradient
    `theBounds` - the list of bounds associated with the colors
    `theCoords` - the coordinates for the gradient
    `theMatrix` - the coordinate-transformation matrix
  Returns:
    the PDF pattern that was created

### getUniqueDestination

    protected PDFDestination getUniqueDestination(PDFDestination newdest)

  Registers and returns newdest if it is unique. Otherwise, returns the equal destination already present in the document.

  Parameters:
    `newdest` - a new, as yet unregistered destination
  Returns:
    newdest if unique, else the already registered instance

### makeDestination

    public PDFDestination makeDestination(java.lang.String idRef,
                                          java.lang.Object goToRef)

  Make a named destination.

  Parameters:
    `idRef` - ID Reference for this destination (the name of the destination)
    `goToRef` - Object reference to the GoTo Action
  Returns:
    the newly created destrination

### makeNames

    public PDFNames makeNames()

  Make a names dictionary (the /Names object).

  Returns:
    the new PDFNames object

### makePageLabels

    public PDFPageLabels makePageLabels()

  Make a names dictionary (the /PageLabels object).

  Returns:
    the new PDFPageLabels object

### makeDests

    public PDFDests makeDests(java.util.List destinationList)

  Make a the head object of the name dictionary (the /Dests object).

  Parameters:
    `destinationList` - a list of PDFDestination instances
  Returns:
    the new PDFDests object

### makeNameTreeNode

    public PDFNameTreeNode makeNameTreeNode()

  Make a name tree node.

  Returns:
    the new name tree node

### makeLink

    public PDFLink makeLink(java.awt.geom.Rectangle2D rect,
                            PDFAction pdfAction)

  Create a PDF link to an existing PDFAction object

  Parameters:
    `rect` - the hotspot position in absolute coordinates
    `pdfAction` - the PDFAction that this link refers to
  Returns:
    the new PDFLink object, or null if either rect or pdfAction is null

### makeLink

    public PDFLink makeLink(java.awt.geom.Rectangle2D rect,
                            java.lang.String page,
                            java.lang.String dest)

  Make an internal link.

  Parameters:
    `rect` - the hotspot position in absolute coordinates
    `page` - the target page reference value
    `dest` - the position destination
  Returns:
    the new PDF link object

### makeLink

    public PDFLink makeLink(java.awt.geom.Rectangle2D rect,
                            java.lang.String destination,
                            int linkType,
                            float yoffset)

  Make a `PDFLink` object

  Parameters:
    `rect` - the clickable rectangle
    `destination` - the destination file
    `linkType` - the link type
    `yoffset` - the yoffset on the page for an internal link
  Returns:
    the PDFLink object created

### getExternalAction

    public PDFAction getExternalAction(java.lang.String target,
                                       boolean newWindow)

  Create/find and return the appropriate external PDFAction according to the target

  Parameters:
    `target` - The external target. This may be a PDF file name (optionally with internal page number or destination) or any type of URI.
    `newWindow` - boolean indicating whether the target should be displayed in a new window
  Returns:
    the PDFAction thus created or found

### getGoToReference

    public java.lang.String getGoToReference(java.lang.String pdfPageRef,
                                             float yoffset)

  Create or find a PDF GoTo with the given page reference string and Y offset, and return its PDF object reference

  Parameters:
    `pdfPageRef` - the PDF page reference, e.g. "23 0 R"
    `yoffset` - the distance from the bottom of the page in points
  Returns:
    the GoTo's object reference

### getPDFGoTo

    public PDFGoTo getPDFGoTo(java.lang.String pdfPageRef,
                              java.awt.geom.Point2D position)

  Finds and returns a PDFGoTo to the given page and position. Creates the PDFGoTo if not found.

  Parameters:
    `pdfPageRef` - the PDF page reference
    `position` - the (X,Y) position in points
  Returns:
    the new or existing PDFGoTo object

### makeOutline

    public PDFOutline makeOutline(PDFOutline parent,
                                  java.lang.String label,
                                  java.lang.String actionRef,
                                  boolean showSubItems)

  Make an outline object and add it to the given parent

  Parameters:
    `parent` - the parent PDFOutline object (may be null)
    `label` - the title for the new outline object
    `actionRef` - the action reference string to be placed after the /A
    `showSubItems` - whether to initially display child outline items
  Returns:
    the new PDF outline object

### makeOutline

    public PDFOutline makeOutline(PDFOutline parent,
                                  java.lang.String label,
                                  PDFAction pdfAction,
                                  boolean showSubItems)

  Make an outline object and add it to the given parent

  Parameters:
    `parent` - the parent PDFOutline object (may be null)
    `label` - the title for the new outline object
    `pdfAction` - the action that this outline item points to - must not be null!
    `showSubItems` - whether to initially display child outline items
  Returns:
    the new PDFOutline object, or null if pdfAction is null

### makeOutline

    public PDFOutline makeOutline(PDFOutline parent,
                                  java.lang.String label,
                                  java.lang.String destination,
                                  float yoffset,
                                  boolean showSubItems)

  Make an outline object and add it to the given outline

  Parameters:
    `parent` - parent PDFOutline object which may be null
    `label` - the title for the new outline object
    `destination` - the reference string for the action to go to
    `yoffset` - the yoffset on the destination page
    `showSubItems` - whether to initially display child outline items
  Returns:
    the new PDF outline object

### makeEncoding

    public PDFEncoding makeEncoding(java.lang.String encodingName)

  make a /Encoding object

  Parameters:
    `encodingName` - character encoding scheme name
  Returns:
    the created /Encoding object

### makeFont

    public PDFFont makeFont(java.lang.String fontname,
                            java.lang.String basefont,
                            java.lang.String encoding,
                            FontMetrics metrics,
                            FontDescriptor descriptor)

  Make a Type1 /Font object.

  Parameters:
    `fontname` - internal name to use for this font (eg "F1")
    `basefont` - name of the base font (eg "Helvetica")
    `encoding` - character encoding scheme used by the font
    `metrics` - additional information about the font
    `descriptor` - additional information about the font
  Returns:
    the created /Font object

### createPDFEncoding

    public java.lang.Object createPDFEncoding(SingleByteEncoding encoding,
                                              java.lang.String fontNameHint)

  Creates a PDFEncoding instance from a CodePointMapping instance.

  Parameters:
    `encoding` - the code point mapping (encoding)
    `fontNameHint` - ...
  Returns:
    the PDF Encoding dictionary (or a String with the predefined encoding)

### getSubsetWidths

    public PDFWArray getSubsetWidths(CIDFont cidFont)

  Creates and returns a width array with the widths of all the characters in the subset.

  Parameters:
    `cidFont` - the font
  Returns:
    the width array

### makeFontFile

    public AbstractPDFStream makeFontFile(FontDescriptor desc)

  Embeds a font.

  Parameters:
    `desc` - FontDescriptor of the font.
  Returns:
    PDFStream The embedded font file

### makeStream

    public PDFStream makeStream(java.lang.String type,
                                boolean add)

  Make a stream object

  Parameters:
    `type` - the type of stream to be created
    `add` - if true then the stream will be added immediately
  Returns:
    the stream object created

### makePDFICCStream

    public PDFICCStream makePDFICCStream()

  Create a PDFICCStream

  Returns:
    the new PDF ICC stream object
  See Also:
    `PDFImageXObject`, `PDFDeviceColorSpace`

### makeICCBasedColorSpace

    public PDFICCBasedColorSpace makeICCBasedColorSpace(PDFResourceContext res,
                                                        java.lang.String explicitName,
                                                        PDFICCStream iccStream)

  Makes a new ICCBased color space and registers it in the resource context.

  Parameters:
    `res` - the PDF resource context to add the shading, may be null
    `explicitName` - the explicit name for the color space, may be null
    `iccStream` - the ICC stream to associate with this color space
  Returns:
    the newly instantiated color space

### makeSeparationColorSpace

    public PDFSeparationColorSpace makeSeparationColorSpace(PDFResourceContext res,
                                                            org.apache.xmlgraphics.java2d.color.NamedColorSpace ncs)

  Create a new Separation color space.

  Parameters:
    `res` - the resource context (may be null)
    `ncs` - the named color space to map to a separation color space
  Returns:
    the newly created Separation color space

### makeArray

    public PDFArray makeArray(int[] values)

  Make an Array object (ex. Widths array for a font).

  Parameters:
    `values` - the int array values
  Returns:
    the PDF Array with the int values

### makeGState

    public PDFGState makeGState(java.util.Map settings,
                                PDFGState current)

  make an ExtGState for extra graphics options This tries to find a GState that will setup the correct values for the current context. If there is no suitable GState it will create a new one.

  Parameters:
    `settings` - the settings required by the caller
    `current` - the current GState of the current PDF context
  Returns:
    a PDF GState, either an existing GState or a new one

### makeAnnotList

    public PDFAnnotList makeAnnotList()

  Make an annotation list object

  Returns:
    the annotation list object created

fop 1.1

Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.