Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.font

public final Class PDType3CharProc

extends Object
implements COSObjectable, PDContentStream
Class Inheritance
All Implemented Interfaces
org.apache.pdfbox.contentstream.PDContentStream, org.apache.pdfbox.pdmodel.common.COSObjectable
Imports
java.io.IOException, .InputStream, java.util.ArrayList, .List, org.apache.commons.logging.Log, .LogFactory, org.apache.pdfbox.contentstream.PDContentStream, org.apache.pdfbox.contentstream.operator.Operator, org.apache.pdfbox.cos.COSBase, .COSDictionary, .COSName, .COSNumber, .COSStream, org.apache.pdfbox.io.RandomAccessInputStream, .RandomAccessRead, org.apache.pdfbox.pdfparser.PDFStreamParser, org.apache.pdfbox.pdmodel.PDResources, org.apache.pdfbox.pdmodel.common.COSObjectable, .PDRectangle, .PDStream, org.apache.pdfbox.util.Matrix

A Type 3 character procedure. This is a standalone PDF content stream.
Author
John Hewson

Field Summary

Modifier and TypeField and Description
private final COSStream
private final PDType3Font
private static final Log

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public PDRectangle
getBBox()

Implements org.apache.pdfbox.contentstream.PDContentStream.getBBox.

Returns the bounding box of the contents.

public InputStream
getContents()

Implements org.apache.pdfbox.contentstream.PDContentStream.getContents.

Returns this stream's content, if any.

public RandomAccessRead
public PDStream
public COSStream
getCOSObject()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Convert this standard java object to a COS object.

public PDType3Font
public PDRectangle

Returns:

the bounding box of this glyph, or null if the first operator is not d1.
getGlyphBBox
()

Calculate the bounding box of this glyph.

public Matrix
getMatrix()

Implements org.apache.pdfbox.contentstream.PDContentStream.getMatrix.

Returns the matrix which transforms from the stream's space to user space.

public PDResources
getResources()

Implements org.apache.pdfbox.contentstream.PDContentStream.getResources.

Returns this stream's resources, if any.

public float

Returns:

the glyph width.
getWidth
()

Get the width from a type3 charproc stream.

private float
parseWidth(Operator operator, List<COSBase> arguments)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

charStreamback to summary
private final COSStream charStream
fontback to summary
private final PDType3Font font
LOGback to summary
private static final Log LOG

Constructor Detail

PDType3CharProcback to summary
public PDType3CharProc(PDType3Font font, COSStream charStream)

Method Detail

getBBoxback to summary
public PDRectangle getBBox()

Implements org.apache.pdfbox.contentstream.PDContentStream.getBBox.

Doc from org.apache.pdfbox.contentstream.PDContentStream.getBBox.

Returns the bounding box of the contents.

Returns:PDRectangle

the bounding box of the content stream or null

Annotations
@Override
getContentsback to summary
public InputStream getContents() throws IOException

Implements org.apache.pdfbox.contentstream.PDContentStream.getContents.

Doc from org.apache.pdfbox.contentstream.PDContentStream.getContents.

Returns this stream's content, if any.

Returns:InputStream

An InputStream or null.

Annotations
@Override
Exceptions
IOException:
If the stream could not be read
getContentsForRandomAccessback to summary
public RandomAccessRead getContentsForRandomAccess() throws IOException

Implements org.apache.pdfbox.contentstream.PDContentStream.getContentsForRandomAccess.

Doc from org.apache.pdfbox.contentstream.PDContentStream.getContentsForRandomAccess.

Returns this stream's content, if any.

Returns:RandomAccessRead

A RandomAccessRead or null.

Annotations
@Override
Exceptions
IOException:
If the content could not be read
getContentStreamback to summary
public PDStream getContentStream()
getCOSObjectback to summary
public COSStream getCOSObject()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Doc from org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Convert this standard java object to a COS object.

Returns:COSStream

The cos object that matches this Java object.

Annotations
@Override
getFontback to summary
public PDType3Font getFont()
getGlyphBBoxback to summary
public PDRectangle getGlyphBBox() throws IOException

Calculate the bounding box of this glyph. This will work only if the first operator in the stream is d1.

Returns:PDRectangle

the bounding box of this glyph, or null if the first operator is not d1.

Exceptions
IOException:
If an io error occurs while parsing the stream.
getMatrixback to summary
public Matrix getMatrix()

Implements org.apache.pdfbox.contentstream.PDContentStream.getMatrix.

Doc from org.apache.pdfbox.contentstream.PDContentStream.getMatrix.

Returns the matrix which transforms from the stream's space to user space.

Returns:Matrix

the matrix of the content stream or the identity matrix if there isn't any

Annotations
@Override
getResourcesback to summary
public PDResources getResources()

Implements org.apache.pdfbox.contentstream.PDContentStream.getResources.

Doc from org.apache.pdfbox.contentstream.PDContentStream.getResources.

Returns this stream's resources, if any.

Returns:PDResources

the resources of the content stream or null

Annotations
@Override
getWidthback to summary
public float getWidth() throws IOException

Get the width from a type3 charproc stream.

Returns:float

the glyph width.

Exceptions
IOException:
if the stream could not be read, or did not have d0 or d1 as first operator, or if their first argument was not a number.
parseWidthback to summary
private float parseWidth(Operator operator, List<COSBase> arguments) throws IOException