Package org.apache.pdfbox.pdmodel.font
Class PDType3CharProc
java.lang.Object
org.apache.pdfbox.pdmodel.font.PDType3CharProc
- All Implemented Interfaces:
PDContentStream
,COSObjectable
A Type 3 character procedure. This is a standalone PDF content stream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final COSStream
private final PDType3Font
private static final org.apache.commons.logging.Log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBBox()
Returns the bounding box of the contents.Returns this stream's content, if any.Convert this standard java object to a COS object.getFont()
Calculate the bounding box of this glyph.Returns the matrix which transforms from the stream's space to user space.Returns this stream's resources, if any.float
getWidth()
Get the width from a type3 charproc stream.private float
parseWidth
(Operator operator, List<COSBase> arguments)
-
Field Details
-
LOG
private static final org.apache.commons.logging.Log LOG -
font
-
charStream
-
-
Constructor Details
-
PDType3CharProc
-
-
Method Details
-
getCOSObject
Description copied from interface:COSObjectable
Convert this standard java object to a COS object.- Specified by:
getCOSObject
in interfaceCOSObjectable
- Returns:
- The cos object that matches this Java object.
-
getFont
-
getContentStream
-
getContents
Description copied from interface:PDContentStream
Returns this stream's content, if any.- Specified by:
getContents
in interfacePDContentStream
- Returns:
- An InputStream or null.
- Throws:
IOException
- If the stream could not be read
-
getResources
Description copied from interface:PDContentStream
Returns this stream's resources, if any.- Specified by:
getResources
in interfacePDContentStream
- Returns:
- the resources of this stream.
-
getBBox
Description copied from interface:PDContentStream
Returns the bounding box of the contents.- Specified by:
getBBox
in interfacePDContentStream
- Returns:
- the bounding box of this stream.
-
getGlyphBBox
Calculate the bounding box of this glyph. This will work only if the first operator in the stream is d1.- Returns:
- the bounding box of this glyph, or null if the first operator is not d1.
- Throws:
IOException
- If an io error occurs while parsing the stream.
-
getMatrix
Description copied from interface:PDContentStream
Returns the matrix which transforms from the stream's space to user space.- Specified by:
getMatrix
in interfacePDContentStream
- Returns:
- the matrix of this stream.
-
getWidth
Get the width from a type3 charproc stream.- Returns:
- the glyph width.
- Throws:
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.
-
parseWidth
- Throws:
IOException
-