| java.lang.Object com.sun.pdfview.PDFTextFormat
PDFTextFormat | public class PDFTextFormat implements Cloneable(Code) | | a class encapsulating the text state
author: Mike Wessler |
PDFTextFormat | public PDFTextFormat()(Code) | | create a new PDFTextFormat, with initial values
|
carriageReturn | public void carriageReturn()(Code) | | perform a carriage return
|
carriageReturn | public void carriageReturn(float x, float y)(Code) | | perform a carriage return by translating by x and y. The next
carriage return will be relative to the new location.
|
doText | public void doText(PDFPage cmds, String text)(Code) | | add some text to the page.
Parameters: cmds - the PDFPage to add the commands to Parameters: text - the text to add |
doText | public void doText(PDFPage cmds, Object ary) throws PDFParseException(Code) | | add some text to the page.
Parameters: cmds - the PDFPage to add the commands to Parameters: ary - an array of Strings and Doubles, where the Stringsrepresent text to be added, and the Doubles represent kerningamounts. |
end | public void end()(Code) | | end a span of text
|
flush | public void flush()(Code) | | finish any unfinished words. TODO: write this!
|
getCharSpacing | public float getCharSpacing()(Code) | | get the char spacing
|
getFontSize | public float getFontSize()(Code) | | get the font size
|
getHorizontalScale | public float getHorizontalScale()(Code) | | Get the horizontal scale
the horizontal scale, in percent |
getLeading | public float getLeading()(Code) | | get the leading
|
getMode | public int getMode()(Code) | | Get the mode of the text
|
getRise | public float getRise()(Code) | | Get the rise
|
getWordSpacing | public float getWordSpacing()(Code) | | get the word spacing
|
reset | public void reset()(Code) | | reset the PDFTextFormat for a new run
|
setCharSpacing | public void setCharSpacing(float spc)(Code) | | set the character spacing
|
setFont | public void setFont(PDFFont f, float size)(Code) | | set the font and size
|
setHorizontalScale | public void setHorizontalScale(float scl)(Code) | | set the horizontal scale.
Parameters: scl - the horizontal scale, in percent (100=normal) |
setLeading | public void setLeading(float spc)(Code) | | set the leading
|
setMatrix | public void setMatrix(float[] matrix)(Code) | | set the transform matrix directly
|
setMode | public void setMode(int m)(Code) | | set the mode of the text. The correspondence of m to mode is
show in the following table. m is a value from 0-7 in binary:
000 Fill
001 Stroke
010 Fill + Stroke
011 Nothing
100 Fill + Clip
101 Stroke + Clip
110 Fill + Stroke + Clip
111 Clip
Therefore: Fill corresponds to the low bit being 0; Clip
corresponds to the hight bit being 1; and Stroke corresponds
to the middle xor low bit being 1.
|
setRise | public void setRise(float spc)(Code) | | set the rise
|
setTextFormatMode | public void setTextFormatMode(int mode)(Code) | | Set the mode from another text format mode
Parameters: mode - the text render mode using thecodes from PDFShapeCmd and not the wacky PDF codes |
setWordSpacing | public void setWordSpacing(float spc)(Code) | | set the word spacing
|
|
|