com.sun.pdfview
public class PDFTextFormat extends Object implements Cloneable
| Constructor Summary | |
|---|---|
| PDFTextFormat()
create a new PDFTextFormat, with initial values | |
| Method Summary | |
|---|---|
| void | carriageReturn()
perform a carriage return |
| void | carriageReturn(float x, float y)
perform a carriage return by translating by x and y. |
| void | doText(PDFPage cmds, String text)
add some text to the page. |
| void | doText(PDFPage cmds, Object[] ary)
add some text to the page. |
| void | end()
end a span of text |
| void | flush()
finish any unfinished words. |
| float | getCharSpacing() get the char spacing |
| PDFFont | getFont() get the font |
| float | getFontSize() get the font size |
| float | getHorizontalScale()
Get the horizontal scale |
| float | getLeading() get the leading |
| int | getMode()
Get the mode of the text |
| float | getRise()
Get the rise |
| AffineTransform | getTransform()
Get the current transform |
| float | getWordSpacing() get the word spacing |
| void | reset()
reset the PDFTextFormat for a new run |
| void | setCharSpacing(float spc) set the character spacing |
| void | setFont(PDFFont f, float size) set the font and size |
| void | setHorizontalScale(float scl)
set the horizontal scale. |
| void | setLeading(float spc) set the leading |
| void | setMatrix(float[] matrix)
set the transform matrix directly |
| void | setMode(int m)
set the mode of the text. |
| void | setRise(float spc)
set the rise |
| void | setTextFormatMode(int mode)
Set the mode from another text format mode
|
| void | setWordSpacing(float spc) set the word spacing |
Parameters: cmds the PDFPage to add the commands to text the text to add
Parameters: cmds the PDFPage to add the commands to ary an array of Strings and Doubles, where the Strings represent text to be added, and the Doubles represent kerning amounts.
Returns: the horizontal scale, in percent
Parameters: scl the horizontal scale, in percent (100=normal)
Parameters: mode the text render mode using the codes from PDFShapeCmd and not the wacky PDF codes