org.apache.fop.pdf

Class PDFFormXObject

Implemented Interfaces:
PDFWritable

public class PDFFormXObject
extends PDFXObject

PDF Form XObject A derivative of the PDFXObject, is a PDF Stream that has not only a dictionary but a stream of image data.

Field Summary

Fields inherited from class org.apache.fop.pdf.PDFDictionary

entries, order

Fields inherited from class org.apache.fop.pdf.PDFObject

DATE_FORMAT, log

Constructor Summary

PDFFormXObject(int xnumber, PDFStream contents, PDFReference resources)
create a FormXObject with the given number and name and load the image in the object

Method Summary

Rectangle2D
getBBox()
Returns the bounding box.
AffineTransform
getMatrix()
Returns the Matrix value.
protected int
output(OutputStream stream)
protected void
outputRawStreamData(OutputStream out)
protected void
populateStreamDict(Object lengthEntry)
void
setBBox(Rectangle2D bbox)
Sets the bounding box of the Form XObject.
void
setData(byte[] data)
Used to set the contents of the PDF stream.
void
setMatrix(AffineTransform at)
Sets the Matrix value

Methods inherited from class org.apache.fop.pdf.PDFXObject

getName, getSizeHint, populateStreamDict

Methods inherited from class org.apache.fop.pdf.AbstractPDFStream

encodeAndWriteStream, encodeStream, getFilterList, getSizeHint, output, outputRawStreamData, outputStreamData, populateStreamDict, prepareImplicitFilters, setupFilterList

Methods inherited from class org.apache.fop.pdf.PDFDictionary

get, output, put, put, writeDictionary

Methods inherited from class org.apache.fop.pdf.PDFObject

encode, encodeBinaryToHexString, encodeString, encodeText, formatDateTime, formatDateTime, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, output, outputInline, referencePDF, setDocument, setObjectNumber, setParent, toPDF, toPDFString

Constructor Details

PDFFormXObject

public PDFFormXObject(int xnumber,
                      PDFStream contents,
                      PDFReference resources)
create a FormXObject with the given number and name and load the image in the object
Parameters:
xnumber - the pdf object X number
contents - the form's contents
resources - the resource PDF reference

Method Details

getBBox

public Rectangle2D getBBox()
Returns the bounding box.
Returns:
the BBox value

getMatrix

public AffineTransform getMatrix()
Returns the Matrix value.
Returns:
the Matrix

output

protected int output(OutputStream stream)
            throws IOException
Overrides:
output in interface AbstractPDFStream

outputRawStreamData

protected void outputRawStreamData(OutputStream out)
            throws IOException
Overrides:
outputRawStreamData in interface AbstractPDFStream

populateStreamDict

protected void populateStreamDict(Object lengthEntry)
Overrides:
populateStreamDict in interface PDFXObject

setBBox

public void setBBox(Rectangle2D bbox)
Sets the bounding box of the Form XObject.
Parameters:
bbox - the bounding box

setData

public void setData(byte[] data)
            throws IOException
Used to set the contents of the PDF stream.
Parameters:
data - the contents as a byte array

setMatrix

public void setMatrix(AffineTransform at)
Sets the Matrix value
Parameters:
at - the AffineTransform defining the transformation matrix

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