public abstract class PDAbstractContentStream extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
protected PDDocument |
document |
protected Deque<PDFont> |
fontStack |
protected Map<org.apache.pdfbox.pdmodel.font.PDType0Font,org.apache.fontbox.ttf.gsub.GsubWorker> |
gsubWorkers |
protected boolean |
inTextMode |
protected org.apache.commons.logging.Log |
LOG |
protected Deque<org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace> |
nonStrokingColorSpaceStack |
protected OutputStream |
outputStream |
protected org.apache.pdfbox.pdmodel.PDResources |
resources |
protected Deque<org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace> |
strokingColorSpaceStack |
Modifier and Type | Method and Description |
---|---|
void |
addComment(String comment)
Write a comment line.
|
void |
addRect(float x,
float y,
float width,
float height)
Add a rectangle to the current path.
|
void |
addRect(org.apache.pdfbox.pdmodel.common.PDRectangle rectangle)
Add a rectangle to give the current rectangle.
|
protected List<Integer> |
applyGSUBRules(org.apache.fontbox.ttf.gsub.GsubWorker gsubWorker,
ByteArrayOutputStream out,
org.apache.pdfbox.pdmodel.font.PDType0Font font,
Character unicodeChar) |
protected List<Integer> |
applyGSUBRules(org.apache.fontbox.ttf.gsub.GsubWorker gsubWorker,
ByteArrayOutputStream out,
org.apache.pdfbox.pdmodel.font.PDType0Font font,
String word) |
void |
beginMarkedContent(org.apache.pdfbox.cos.COSName tag)
Begin a marked content sequence.
|
void |
beginMarkedContent(org.apache.pdfbox.cos.COSName tag,
org.apache.pdfbox.pdmodel.documentinterchange.markedcontent.PDPropertyList propertyList)
Begin a marked content sequence with a reference to an entry in the page resources' Properties dictionary.
|
void |
beginText()
Begin some text operations.
|
void |
clip()
Intersects the current clipping path with the current path, using the nonzero rule.
|
void |
clipEvenOdd()
Intersects the current clipping path with the current path, using the even-odd rule.
|
void |
close()
Close the content stream.
|
void |
closeAndFillAndStroke()
Close, fill, and then stroke the path, using the nonzero winding number rule to determine the
region to fill.
|
void |
closeAndFillAndStrokeEvenOdd()
Close, fill, and then stroke the path, using the even-odd rule to determine the region to
fill.
|
void |
closeAndStroke()
Close and stroke the path.
|
void |
closePath()
Closes the current subpath.
|
void |
curveTo(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
Append a cubic Bézier curve to the current path.
|
void |
curveTo1(float x1,
float y1,
float x3,
float y3)
Append a cubic Bézier curve to the current path.
|
void |
curveTo2(float x2,
float y2,
float x3,
float y3)
Append a cubic Bézier curve to the current path.
|
void |
drawForm(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject form)
Draws the given Form XObject at the current location.
|
void |
drawImage(org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject image,
float x,
float y)
Draw an image at the x,y coordinates, with the default size of the image.
|
void |
drawImage(org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject image,
float x,
float y,
float width,
float height)
Draw an image at the x,y coordinates, with the given size.
|
void |
drawImage(org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject image,
org.apache.pdfbox.util.Matrix matrix)
Draw an image at the origin with the given transformation matrix.
|
void |
drawImage(org.apache.pdfbox.pdmodel.graphics.image.PDInlineImage inlineImage,
float x,
float y)
Draw an inline image at the x,y coordinates, with the default size of the image.
|
void |
drawImage(org.apache.pdfbox.pdmodel.graphics.image.PDInlineImage inlineImage,
float x,
float y,
float width,
float height)
Draw an inline image at the x,y coordinates and a certain width and height.
|
protected byte[] |
encodeForGsub(org.apache.fontbox.ttf.gsub.GsubWorker gsubWorker,
Set<Integer> glyphIds,
org.apache.pdfbox.pdmodel.font.PDType0Font font,
Character character) |
protected byte[] |
encodeForGsub(org.apache.fontbox.ttf.gsub.GsubWorker gsubWorker,
Set<Integer> glyphIds,
org.apache.pdfbox.pdmodel.font.PDType0Font font,
String text) |
void |
endMarkedContent()
End a marked content sequence.
|
void |
endText()
End some text operations.
|
void |
endTextInternal()
end show character.
|
void |
fill()
Fills the path using the nonzero winding number rule.
|
void |
fillAndStroke()
Fill and then stroke the path, using the nonzero winding number rule to determine the region
to fill.
|
void |
fillAndStrokeEvenOdd()
Fill and then stroke the path, using the even-odd rule to determine the region to
fill.
|
void |
fillEvenOdd()
Fills the path using the even-odd winding rule.
|
protected org.apache.pdfbox.cos.COSName |
getName(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace) |
protected boolean |
isOutside255Interval(int val) |
void |
lineTo(float x,
float y)
Draw a line from the current position to the given coordinates.
|
void |
moveTo(float x,
float y)
Move the current position to the given coordinates.
|
void |
newLine()
Move to the start of the next line of text.
|
void |
newLineAtOffset(float tx,
float ty)
The Td operator.
|
void |
restoreGraphicsState()
Q operator.
|
void |
saveGraphicsState()
q operator.
|
void |
setCharacterSpacing(float spacing)
Set the character spacing.
|
void |
setFont(PDFont font,
float fontSize)
Set the font and font size to draw text with.
|
void |
setGraphicsStateParameters(org.apache.pdfbox.pdmodel.graphics.state.PDExtendedGraphicsState state)
Set an extended graphics state.
|
void |
setHorizontalScaling(float scale)
Set the horizontal scaling to scale / 100.
|
void |
setLeading(float leading)
Sets the text leading.
|
void |
setLineCapStyle(int lineCapStyle)
Set the line cap style.
|
void |
setLineDashPattern(float[] pattern,
float phase)
Set the line dash pattern.
|
void |
setLineJoinStyle(int lineJoinStyle)
Set the line join style.
|
void |
setLineWidth(float lineWidth)
Set line width to the given value.
|
protected void |
setMaximumFractionDigits(int fractionDigitsNumber)
Sets the maximum number of digits allowed for fractional numbers.
|
void |
setMiterLimit(float miterLimit)
Set the miter limit.
|
void |
setNonStrokingColor(Color color)
Set the non-stroking color using an AWT color.
|
void |
setNonStrokingColor(float g)
Set the non-stroking color in the DeviceGray color space.
|
void |
setNonStrokingColor(float r,
float g,
float b)
Set the non-stroking color in the DeviceRGB color space.
|
void |
setNonStrokingColor(float c,
float m,
float y,
float k)
Set the non-stroking color in the DeviceCMYK color space.
|
void |
setNonStrokingColor(org.apache.pdfbox.pdmodel.graphics.color.PDColor color)
Sets the non-stroking color and, if necessary, the non-stroking color space.
|
protected void |
setNonStrokingColorSpaceStack(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace) |
void |
setRenderingMode(org.apache.pdfbox.pdmodel.graphics.state.RenderingMode rm)
Set the text rendering mode.
|
void |
setStrokingColor(Color color)
Set the stroking color using an AWT color.
|
void |
setStrokingColor(float g)
Set the stroking color in the DeviceGray color space.
|
void |
setStrokingColor(float r,
float g,
float b)
Set the stroking color in the DeviceRGB color space.
|
void |
setStrokingColor(float c,
float m,
float y,
float k)
Set the stroking color in the DeviceCMYK color space.
|
void |
setStrokingColor(org.apache.pdfbox.pdmodel.graphics.color.PDColor color)
Sets the stroking color and, if necessary, the stroking color space.
|
protected void |
setStrokingColorSpaceStack(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace) |
void |
setTextMatrix(org.apache.pdfbox.util.Matrix matrix)
The Tm operator.
|
void |
setTextRise(float rise)
Set the text rise value, i.e.
|
void |
setWordSpacing(float spacing)
Set the word spacing.
|
void |
shadingFill(org.apache.pdfbox.pdmodel.graphics.shading.PDShading shading)
Fills the clipping area with the given shading.
|
void |
showCharacter(Character character)
Shows the given text at the location specified by the current text matrix.
|
void |
showCharacterInternal(Character character)
Outputs a string using the correct encoding and subsetting as required.
|
void |
showText(String text)
Shows the given text at the location specified by the current text matrix.
|
protected void |
showTextInternal(String text)
Outputs a string using the correct encoding and subsetting as required.
|
void |
showTextWithPositioning(Object[] textWithPositioningArray)
Shows the given text at the location specified by the current text matrix with the given
interspersed positioning.
|
void |
stroke()
Stroke the path.
|
void |
transform(org.apache.pdfbox.util.Matrix matrix)
The cm operator.
|
protected void |
write(String text)
Writes a string to the content stream as ASCII.
|
protected void |
writeBytes(byte[] data)
Writes binary data to the content stream.
|
protected void |
writeLine()
Writes a newline to the content stream as ASCII.
|
protected void |
writeOperand(org.apache.pdfbox.cos.COSName name)
Writes a COSName to the content stream.
|
protected void |
writeOperand(float real)
Writes a real number to the content stream.
|
protected void |
writeOperand(int integer)
Writes an integer number to the content stream.
|
protected void |
writeOperand(String text)
Writes a COSName to the content stream.
|
void |
writeOperator(String text)
Writes a string to the content stream as ASCII.
|
protected final org.apache.commons.logging.Log LOG
protected final PDDocument document
protected final OutputStream outputStream
protected final org.apache.pdfbox.pdmodel.PDResources resources
protected boolean inTextMode
protected final Deque<org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace> nonStrokingColorSpaceStack
protected final Deque<org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace> strokingColorSpaceStack
protected final Map<org.apache.pdfbox.pdmodel.font.PDType0Font,org.apache.fontbox.ttf.gsub.GsubWorker> gsubWorkers
protected void setMaximumFractionDigits(int fractionDigitsNumber)
fractionDigitsNumber
- the maximum number of digits allowed for fractional numbersNumberFormat.setMaximumFractionDigits(int)
public void beginText() throws IOException
IOException
- If there is an error writing to the stream or if you attempt to
nest beginText calls.IllegalStateException
- If the method was not allowed to be called at this time.public void endText() throws IOException
IOException
- If there is an error writing to the stream or if you attempt to
nest endText calls.IllegalStateException
- If the method was not allowed to be called at this time.public void setFont(PDFont font, float fontSize) throws IOException
font
- The font to use.fontSize
- The font size to draw the text.IOException
- If there is an error writing the font information.public void showTextWithPositioning(Object[] textWithPositioningArray) throws IOException
textWithPositioningArray
- An array consisting of String and Float types. Each String is
output to the page using the current text matrix. Using the default coordinate system, each
interspersed number adjusts the current text matrix by translating to the left or down for
horizontal and vertical text respectively. The number is expressed in thousands of a text
space unit, and may be negative.IOException
- if an io exception occurs.public void showText(String text) throws IOException
text
- The Unicode text to show.IOException
- If an io exception occurs.IllegalArgumentException
- if a character isn't supported by the current fontpublic void showCharacter(Character character) throws IOException
character
- The Unicode character to show.IOException
- If an io exception occurs.IllegalArgumentException
- if a character isn't supported by the current fontpublic void showCharacterInternal(Character character) throws IOException
character
- The Unicode character to show.IOException
- If an io exception occurs.public void endTextInternal() throws IOException
IOException
- If an io exception occurs.protected void showTextInternal(String text) throws IOException
text
- The Unicode text to show.IOException
- If an io exception occurs.public void setLeading(float leading) throws IOException
leading
- The leading in unscaled text units.IOException
- If there is an error writing to the stream.public void newLine() throws IOException
setLeading(float)
)
to have been set.IOException
- If there is an error writing to the stream.public void newLineAtOffset(float tx, float ty) throws IOException
tx
- The x translation.ty
- The y translation.IOException
- If there is an error writing to the stream.IllegalStateException
- If the method was not allowed to be called at this time.public void setTextMatrix(org.apache.pdfbox.util.Matrix matrix) throws IOException
matrix
- the transformation matrixIOException
- If there is an error writing to the stream.IllegalStateException
- If the method was not allowed to be called at this time.public void drawImage(org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject image, float x, float y) throws IOException
image
- The image to draw.x
- The x-coordinate to draw the image.y
- The y-coordinate to draw the image.IOException
- If there is an error writing to the stream.public void drawImage(org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject image, float x, float y, float width, float height) throws IOException
image
- The image to draw.x
- The x-coordinate to draw the image.y
- The y-coordinate to draw the image.width
- The width to draw the image.height
- The height to draw the image.IOException
- If there is an error writing to the stream.IllegalStateException
- If the method was called within a text block.public void drawImage(org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject image, org.apache.pdfbox.util.Matrix matrix) throws IOException
image
- The image to draw.matrix
- The transformation matrix to apply to the image.IOException
- If there is an error writing to the stream.IllegalStateException
- If the method was called within a text block.public void drawImage(org.apache.pdfbox.pdmodel.graphics.image.PDInlineImage inlineImage, float x, float y) throws IOException
inlineImage
- The inline image to draw.x
- The x-coordinate to draw the inline image.y
- The y-coordinate to draw the inline image.IOException
- If there is an error writing to the stream.public void drawImage(org.apache.pdfbox.pdmodel.graphics.image.PDInlineImage inlineImage, float x, float y, float width, float height) throws IOException
inlineImage
- The inline image to draw.x
- The x-coordinate to draw the inline image.y
- The y-coordinate to draw the inline image.width
- The width of the inline image to draw.height
- The height of the inline image to draw.IOException
- If there is an error writing to the stream.IllegalStateException
- If the method was called within a text block.public void drawForm(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject form) throws IOException
form
- Form XObjectIOException
- if the content stream could not be writtenIllegalStateException
- If the method was called within a text block.public void transform(org.apache.pdfbox.util.Matrix matrix) throws IOException
matrix
- the transformation matrixIOException
- If there is an error writing to the stream.public void saveGraphicsState() throws IOException
IOException
- If an error occurs while writing to the stream.public void restoreGraphicsState() throws IOException
IOException
- If an error occurs while writing to the stream.protected org.apache.pdfbox.cos.COSName getName(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
public void setStrokingColor(org.apache.pdfbox.pdmodel.graphics.color.PDColor color) throws IOException
color
- Color in a specific color space.IOException
- If an IO error occurs while writing to the stream.public void setStrokingColor(Color color) throws IOException
color
- The color to set.IOException
- If an IO error occurs while writing to the stream.public void setStrokingColor(float r, float g, float b) throws IOException
r
- The red valueg
- The green value.b
- The blue value.IOException
- If an IO error occurs while writing to the stream.IllegalArgumentException
- If the parameters are invalid.public void setStrokingColor(float c, float m, float y, float k) throws IOException
c
- The cyan value.m
- The magenta value.y
- The yellow value.k
- The black value.IOException
- If an IO error occurs while writing to the stream.IllegalArgumentException
- If the parameters are invalid.public void setStrokingColor(float g) throws IOException
g
- The gray value.IOException
- If an IO error occurs while writing to the stream.IllegalArgumentException
- If the parameter is invalid.public void setNonStrokingColor(org.apache.pdfbox.pdmodel.graphics.color.PDColor color) throws IOException
color
- Color in a specific color space.IOException
- If an IO error occurs while writing to the stream.public void setNonStrokingColor(Color color) throws IOException
color
- The color to set.IOException
- If an IO error occurs while writing to the stream.public void setNonStrokingColor(float r, float g, float b) throws IOException
r
- The red value.g
- The green value.b
- The blue value.IOException
- If an IO error occurs while writing to the stream.IllegalArgumentException
- If the parameters are invalid.public void setNonStrokingColor(float c, float m, float y, float k) throws IOException
c
- The cyan value.m
- The magenta value.y
- The yellow value.k
- The black value.IOException
- If an IO error occurs while writing to the stream.public void setNonStrokingColor(float g) throws IOException
g
- The gray value.IOException
- If an IO error occurs while writing to the stream.IllegalArgumentException
- If the parameter is invalid.public void addRect(float x, float y, float width, float height) throws IOException
x
- The lower left x coordinate.y
- The lower left y coordinate.width
- The width of the rectangle.height
- The height of the rectangle.IOException
- If the content stream could not be written.IllegalStateException
- If the method was called within a text block.public void addRect(org.apache.pdfbox.pdmodel.common.PDRectangle rectangle) throws IOException
rectangle
- The rectangle.IOException
- If the content stream could not be written.IllegalStateException
- If the method was called within a text block.public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3) throws IOException
x1
- x coordinate of the point 1y1
- y coordinate of the point 1x2
- x coordinate of the point 2y2
- y coordinate of the point 2x3
- x coordinate of the point 3y3
- y coordinate of the point 3IOException
- If the content stream could not be written.IllegalStateException
- If the method was called within a text block.public void curveTo2(float x2, float y2, float x3, float y3) throws IOException
x2
- x coordinate of the point 2y2
- y coordinate of the point 2x3
- x coordinate of the point 3y3
- y coordinate of the point 3IllegalStateException
- If the method was called within a text block.IOException
- If the content stream could not be written.public void curveTo1(float x1, float y1, float x3, float y3) throws IOException
x1
- x coordinate of the point 1y1
- y coordinate of the point 1x3
- x coordinate of the point 3y3
- y coordinate of the point 3IOException
- If the content stream could not be written.IllegalStateException
- If the method was called within a text block.public void moveTo(float x, float y) throws IOException
x
- The x coordinate.y
- The y coordinate.IOException
- If the content stream could not be written.IllegalStateException
- If the method was called within a text block.public void lineTo(float x, float y) throws IOException
x
- The x coordinate.y
- The y coordinate.IOException
- If the content stream could not be written.IllegalStateException
- If the method was called within a text block.public void stroke() throws IOException
IOException
- If the content stream could not be writtenIllegalStateException
- If the method was called within a text block.public void closeAndStroke() throws IOException
IOException
- If the content stream could not be writtenIllegalStateException
- If the method was called within a text block.public void fill() throws IOException
IOException
- If the content stream could not be writtenIllegalStateException
- If the method was called within a text block.public void fillEvenOdd() throws IOException
IOException
- If the content stream could not be writtenIllegalStateException
- If the method was called within a text block.public void fillAndStroke() throws IOException
fill()
and the second with stroke()
.IOException
- If the content stream could not be writtenIllegalStateException
- If the method was called within a text block.public void fillAndStrokeEvenOdd() throws IOException
fillEvenOdd()
and the second with stroke()
.IOException
- If the content stream could not be writtenIllegalStateException
- If the method was called within a text block.public void closeAndFillAndStroke() throws IOException
closePath()
and then fillAndStroke()
.IOException
- If the content stream could not be writtenIllegalStateException
- If the method was called within a text block.public void closeAndFillAndStrokeEvenOdd() throws IOException
closePath()
and then fillAndStrokeEvenOdd()
.IOException
- If the content stream could not be writtenIllegalStateException
- If the method was called within a text block.public void shadingFill(org.apache.pdfbox.pdmodel.graphics.shading.PDShading shading) throws IOException
shading
- Shading resourceIOException
- If the content stream could not be writtenIllegalStateException
- If the method was called within a text block.public void closePath() throws IOException
IOException
- If the content stream could not be writtenIllegalStateException
- If the method was called within a text block.public void clip() throws IOException
IOException
- If the content stream could not be writtenIllegalStateException
- If the method was called within a text block.public void clipEvenOdd() throws IOException
IOException
- If the content stream could not be writtenIllegalStateException
- If the method was called within a text block.public void setLineWidth(float lineWidth) throws IOException
lineWidth
- The width which is used for drawing.IOException
- If the content stream could not be writtenpublic void setLineJoinStyle(int lineJoinStyle) throws IOException
lineJoinStyle
- 0 for miter join, 1 for round join, and 2 for bevel join.IOException
- If the content stream could not be written.IllegalArgumentException
- If the parameter is not a valid line join style.public void setLineCapStyle(int lineCapStyle) throws IOException
lineCapStyle
- 0 for butt cap, 1 for round cap, and 2 for projecting square cap.IOException
- If the content stream could not be written.IllegalArgumentException
- If the parameter is not a valid line cap style.public void setLineDashPattern(float[] pattern, float phase) throws IOException
pattern
- The pattern arrayphase
- The phase of the patternIOException
- If the content stream could not be written.public void setMiterLimit(float miterLimit) throws IOException
miterLimit
- the new miter limit.IOException
- If the content stream could not be written.IllegalArgumentException
- If the parameter is ≤ 0.public void beginMarkedContent(org.apache.pdfbox.cos.COSName tag) throws IOException
tag
- the tag to be added to the content streamIOException
- If the content stream could not be writtenpublic void beginMarkedContent(org.apache.pdfbox.cos.COSName tag, org.apache.pdfbox.pdmodel.documentinterchange.markedcontent.PDPropertyList propertyList) throws IOException
tag
- the tag to be added to the content streampropertyList
- property list to be added to the content streamIOException
- If the content stream could not be writtenpublic void endMarkedContent() throws IOException
IOException
- If the content stream could not be writtenpublic void setGraphicsStateParameters(org.apache.pdfbox.pdmodel.graphics.state.PDExtendedGraphicsState state) throws IOException
state
- The extended graphics state to be added to the content streamIOException
- If the content stream could not be written.public void addComment(String comment) throws IOException
comment
- the comment to be added to the content streamIOException
- If the content stream could not be written.IllegalArgumentException
- If the comment contains a newline. This is not allowed, because the next line
could be ordinary PDF content.protected void writeOperand(float real) throws IOException
real
- the real number to be added to the content streamIOException
- If the underlying stream has a problem being written to.IllegalArgumentException
- if the parameter is not a finite numberprotected void writeOperand(int integer) throws IOException
integer
- the integer to be added to the content streamIOException
- If the underlying stream has a problem being written to.protected void writeOperand(org.apache.pdfbox.cos.COSName name) throws IOException
name
- the name to be added to the content streamIOException
- If the underlying stream has a problem being written to.protected void writeOperand(String text) throws IOException
text
- the text to be added to the content streamIOException
- If the underlying stream has a problem being written to.public void writeOperator(String text) throws IOException
text
- the text to be added to the content stream followed by a newlineIOException
- If the underlying stream has a problem being written to.protected void write(String text) throws IOException
text
- the text to be added to the content streamIOException
- If the underlying stream has a problem being written to.protected void writeLine() throws IOException
IOException
- If the underlying stream has a problem being written to.protected void writeBytes(byte[] data) throws IOException
data
- as byte formatted to be added to the content streamIOException
- If the underlying stream has a problem being written to.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
- If the underlying stream has a problem being written to.protected boolean isOutside255Interval(int val)
protected void setStrokingColorSpaceStack(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
protected void setNonStrokingColorSpaceStack(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
public void setCharacterSpacing(float spacing) throws IOException
spacing
- character spacingIOException
- If the content stream could not be written.public void setWordSpacing(float spacing) throws IOException
This will have an effect only with Type1 and TrueType fonts, not with Type0 fonts. The PDF specification tells why: "Word spacing shall be applied to every occurrence of the single-byte character code 32 in a string when using a simple font or a composite font that defines code 32 as a single-byte code. It shall not apply to occurrences of the byte value 32 in multiple-byte codes."
spacing
- word spacingIOException
- If the content stream could not be written.public void setHorizontalScaling(float scale) throws IOException
scale
- number specifying the percentage of the normal width. Default value: 100 (normal
width).IOException
- If the content stream could not be written.public void setRenderingMode(org.apache.pdfbox.pdmodel.graphics.state.RenderingMode rm) throws IOException
rm
- The text rendering mode.IOException
- If the content stream could not be written.public void setTextRise(float rise) throws IOException
rise
- Specifies the distance, in unscaled text space units, to move the baseline up or down from its
default location. 0 restores the default location.IOException
- If the content stream could not be written.protected byte[] encodeForGsub(org.apache.fontbox.ttf.gsub.GsubWorker gsubWorker, Set<Integer> glyphIds, org.apache.pdfbox.pdmodel.font.PDType0Font font, String text) throws IOException
IOException
protected List<Integer> applyGSUBRules(org.apache.fontbox.ttf.gsub.GsubWorker gsubWorker, ByteArrayOutputStream out, org.apache.pdfbox.pdmodel.font.PDType0Font font, String word) throws IOException
IOException
protected byte[] encodeForGsub(org.apache.fontbox.ttf.gsub.GsubWorker gsubWorker, Set<Integer> glyphIds, org.apache.pdfbox.pdmodel.font.PDType0Font font, Character character) throws IOException
IOException
protected List<Integer> applyGSUBRules(org.apache.fontbox.ttf.gsub.GsubWorker gsubWorker, ByteArrayOutputStream out, org.apache.pdfbox.pdmodel.font.PDType0Font font, Character unicodeChar) throws IOException
IOException
Copyright © 2024. All rights reserved.