pdfstringformat-ag凯发旗舰厅



com.spire.pdf.graphics
class pdfstringformat

java.lang.object
  extended by com.spire.pdf.graphics.pdfstringformat

public final class pdfstringformat
extends java.lang.object

represents the text layout information.


constructor summary
pdfstringformat()
          initializes a new instance of the class.
pdfstringformat(pdftextalignment alignment)
          initializes a new instance of the class.
pdfstringformat(pdftextalignment alignment, pdfverticalalignment linealignment)
          initializes a new instance of the class.
pdfstringformat(java.lang.string columnformat)
          initializes a new instance of the class.
 
method summary
 void setalignment(pdftextalignment value)
          sets the text alignment.
 void setcharacterspacing(float value)
          sets value that indicates a size among the characters in the text.
 void setfirstlineindent(float value)
          sets the indent of the first line in the text.
 void setlinealignment(pdfverticalalignment value)
          sets the vertical text alignment.
 void setlinelimit(boolean value)
          only entire lines are laid out in the formatting rectangle.
 void setlinespacing(float value)
          sets value that indicates the vertical distance between the baselines of adjacent lines of text.
 void setmeasuretrailingspaces(boolean value)
          includes the trailing space at the end of each line.
 void setnoclip(boolean value)
          overhanging parts of glyphs, and unwrapped text reaching outside the formatting rectangle are allowed to show.
 void setparagraphindent(double value)
          sets the indent of the first line in the paragraph.
 void setparagraphindent(float value)
          sets the indent of the first line in the paragraph.
 void setrighttoleft(boolean value)
          sets the value that indicates text direction mode.
 void setsubsuperscript(pdfsubsuperscript value)
          sets value indicating whether the text is in subscript or superscript mode.
 void setwordspacing(float value)
          sets value that indicates a size among the words in the text.
 void setwordwrap(pdfwordwraptype value)
          sets value indicating type of the text wrapping.
 
constructor detail

pdfstringformat

public pdfstringformat()
initializes a new instance of the class.

pdfstringformat

public pdfstringformat(pdftextalignment alignment)
initializes a new instance of the class.
parameters:
alignment - the alignment.

pdfstringformat

public pdfstringformat(java.lang.string columnformat)
initializes a new instance of the class.
parameters:
columnformat - the column format.

pdfstringformat

public pdfstringformat(pdftextalignment alignment,
                       pdfverticalalignment linealignment)
initializes a new instance of the class.
parameters:
alignment - the alignment.
linealignment - the vertical alignment.
method detail

setalignment

public void setalignment(pdftextalignment value)
sets the text alignment.

setlinealignment

public void setlinealignment(pdfverticalalignment value)
sets the vertical text alignment.

setrighttoleft

public void setrighttoleft(boolean value)
sets the value that indicates text direction mode. note, that this property doesn't change any alignment of the text. property should be set manually to align the text. this property just enables or disables support of right to left approach. if the value is false, the text won't be checked for right to left symbols occurrence.

setcharacterspacing

public void setcharacterspacing(float value)
sets value that indicates a size among the characters in the text. when the glyph for each character in the string is rendered, this value is added to the the glyphs displacement. default value is 0.

setwordspacing

public void setwordspacing(float value)
sets value that indicates a size among the words in the text. word spacing works the same way as character spacing but applies only to the space character, code 32.

default value is 0.


setlinespacing

public void setlinespacing(float value)
sets value that indicates the vertical distance between the baselines of adjacent lines of text.

default value is 0.


setsubsuperscript

public void setsubsuperscript(pdfsubsuperscript value)
sets value indicating whether the text is in subscript or superscript mode.

setparagraphindent

public void setparagraphindent(float value)
sets the indent of the first line in the paragraph.

setparagraphindent

public void setparagraphindent(double value)
sets the indent of the first line in the paragraph.

setlinelimit

public void setlinelimit(boolean value)
only entire lines are laid out in the formatting rectangle. by default layout continues until the end of the text, or until no more lines are visible as a result of clipping, whichever comes first. note that the default settings allow the last line to be partially obscured by a formatting rectangle that is not a whole multiple of the line height. to ensure that only whole lines are seen, specify this value and be careful to provide a formatting rectangle at least as tall as the height of one line.
parameters:
value - true if [line limit]; otherwise, false.

setmeasuretrailingspaces

public void setmeasuretrailingspaces(boolean value)
includes the trailing space at the end of each line. by default the boundary rectangle returned by the measurestring method of pdffont excludes the space at the end of each line. set this flag to include that space in measuretrailingspaces. true if [measure trailing spaces]; otherwise, false.

setnoclip

public void setnoclip(boolean value)
overhanging parts of glyphs, and unwrapped text reaching outside the formatting rectangle are allowed to show. by default all text and glyph parts reaching outside the formatting rectangle are clipped. note:it works only when set linelimit value to false.
parameters:
value -

setwordwrap

public void setwordwrap(pdfwordwraptype value)
sets value indicating type of the text wrapping.

setfirstlineindent

public void setfirstlineindent(float value)
sets the indent of the first line in the text.


网站地图