public class Heading extends Text
Represents a heading in Pdf document.
[C#] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.Sections.Add(); Heading heading1 = new Heading(pdf1,sec1,1); Segment segment1 = new Segment(heading1); heading1.Segments.Add(segment1); heading1.IsAutoSequence = true; segment1.Content = "this is heading of level 1"; sec1.Paragraphs.Add(heading1); //please make sure all properties are set before Add Heading heading2 = new Heading(pdf1,sec1,2); Segment segment2 = new Segment(heading2); heading2.Segments.Add(segment2); heading2.IsAutoSequence = true; segment2.Content = "this is heading of level 2"; sec1.Paragraphs.Add(heading2); //please make sure all properties are set before Add Heading heading3 = new Heading(pdf1,sec1,1); Segment segment3 = new Segment(heading3); heading3.Segments.Add(segment3); heading3.IsAutoSequence = false; heading3.LabelWidth = 60; heading3.UserLabel = "bullet1"; segment3.Content = "this is bullet style 1"; sec1.Paragraphs.Add(heading3); //please make sure all properties are set before Add pdf1.Save(...); [Visual Basic] Dim pdf1 As Pdf = New Pdf() Dim sec1 As Section = pdf1.Sections.Add() Dim heading1 As Heading = New Heading(pdf1, sec1, 1) Dim segment1 As Segment = New Segment(heading1) heading1.Segments.Add(segment1) heading1.IsAutoSequence = True segment1.Content = "this is heading of level 1" sec1.Paragraphs.Add(heading1) 'please make sure all properties are set before Add Dim heading2 As Heading = New Heading(pdf1, sec1, 2) Dim segment2 As Segment = New Segment(heading2) heading2.Segments.Add(segment2) heading2.IsAutoSequence = True segment2.Content = "this is heading of level 2" sec1.Paragraphs.Add(heading2) 'please make sure all properties are set before Add Dim heading3 As Heading = New Heading(pdf1, sec1, 1) Dim segment3 As Segment = New Segment(heading3) heading3.Segments.Add(segment3) heading3.IsAutoSequence = False heading3.LabelWidth = 60 heading3.UserLabel = "bullet1" segment3.Content = "this is bullet style 1" sec1.Paragraphs.Add(heading3) 'please make sure all properties are set before Add pdf1.Save(...) [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section> <Heading Level="1" IsAutoSequence="true"> <Segment>this is heading of level 1</Segment> </Heading> <Heading Level="2" IsAutoSequence="true"> <Segment>this is heading of level 2</Segment> </Heading> <Heading Level="1" IsAutoSequence="false" LabelWidth="60" UserLabel="bullet1"> <Segment>this is bullet style 1</Segment> </Heading> </Section> </Pdf>
Paragraph.VerticalPositionInfo
Modifier and Type | Field and Description |
---|---|
float |
BakLabelWidth |
boolean |
IsOnlyLebel |
boolean |
IsRTLHeading |
float |
RightMarginPosX |
BakAlignmentOfRotateText, bakSegments, customStopAlignmentType, FirstLineHeight, FloatingBoxHeight, FloatingBoxMarginLeft, FloatingBoxMarginRight, FloatingBoxMarginTop, FloatingBoxPosX, FloatingBoxPosY, FloatingBoxWidth, HasNonBreakSpace, HowManyLinesOfRotateText, ifHtmlTagSupportedOverwriteHtmlFontNames, ifHtmlTagSupportedOverwriteHtmlFontSizes, IsAutoFontAdjustProcessed, IsLongWordProcessed, IsMacroReProcessed, isMarinForBorderAdded, isNCSymbol, isNPSymbol, IsRtlSegmentModeProcessed, IsSegmentsReversed, IsSubstitutionNeed, IsWidowOrphanControlSet, LastLineHeight, LineHeightOfRotateText, RealWidthOfRotateText, ShowLengthOfRotateText, TabLeaders, TextLines
absolutePosX, absolutePosY, ClippingArea, FixedHeight, FixedWidth, isAbsoluteLayout, isFixedLayout, IsNeedAddToPage, IsPositionGot, IsPositionProcessed, isRelativeLayout, MayNeedReprocess, NextParagraph, posBottom, posLeft, posRight, posTop, RefPara, relativePosX, relativePosY, VerticalPosInfo
Constructor and Description |
---|
Heading()
Initializes a new instance of the
Heading class. |
Heading(Pdf pdf,
Section section,
int level)
Initializes a new instance of the
Heading class. |
Modifier and Type | Method and Description |
---|---|
Object |
clone_Heading_New()
Clones a new
Heading object. |
Object |
completeClone_Heading_New()
Clones a new
Heading object. |
static Heading |
createFromHTML(Pdf pdf,
Section section,
int level) |
Color |
getBackColorInTOC()
Gets or sets a Color of the corresponding line in Table of Contents.
|
int |
getBulletAlignment()
Gets or sets a
AlignmentType value that indicates the
alignment type of Bullet/Label. |
Color |
getBulletColor()
.
|
String |
getBulletFontName()
Gets or sets a string that indicates the font name for bullet.
|
float |
getBulletOffset()
Gets or sets a float value that indicates the offset of the bullet.
|
String |
getBulletTTFFile()
Gets or sets a string that indicates the truetype font file name for
the bullet.
|
String |
getCaptionLebel()
Gets or sets a string that indicates the heading label.
|
int |
getHeadingType()
Gets or sets the
aspose.pdf.HeadingType of this heading. |
Image |
getImageLabel()
Gets or sets the an Image that is used as label.If ImageLabel is not
null, the ImageLabel substitutes for number heading.
|
String |
getLabel()
Gets or sets an string value that indicates the user-defined heading
label.
|
int |
getLabelAlignment()
Gets or sets a
AlignmentType value that indicates the
alignment type of Bullet/Label. |
Color |
getLabelColor()
Gets or sets a
Color value that indicates the color of the
bullet/label. |
String |
getLabelFontName()
Gets or sets a string value that indicates the font name of label.
|
float |
getLabelFontSize()
Gets or sets a float value that indicates the font size of label.
|
String |
getLabelPattern()
Gets or sets the heading pattern in the "ch(s)%ch(s)" form, ch(s) can
be none ,an ASCII or a combination of ASCIIs, % stands for the heading
number.
|
float |
getLabelWidth()
Gets or sets a float value that indicates the width of the label of
the heading.
|
int |
getLevel()
Gets or sets an int value that indicates the level of the heading.
|
NumberArray |
getNumberArray()
Gets or sets a
NumberArray object that indicates the heading
number array. |
float |
getRealLevel() |
int |
getStartNumber()
Gets or sets a int number that indicates the start number of this
heading when using auto numbering.
|
ListSection |
getTOC()
Gets or sets a corresponding Table of Contents.
|
String |
getUserLabel()
Gets or sets a string that indicates the caption label.
|
boolean |
isAutoHyphenated_Heading_New()
Gets or sets a bool value that indicates whehter the text is
hyphenated automatically.
|
void |
isAutoHyphenated_Heading_New(boolean value) |
boolean |
isAutoSequence()
Gets or sets a bool value that indicates whether the number of the
heading is in an automatical sequence.
|
void |
isAutoSequence(boolean value) |
boolean |
isBulletUnicode()
Gets or sets a bool value that indicates whether the bullet/Label
uses a unicode character.
|
void |
isBulletUnicode(boolean value) |
boolean |
isInBookmark() |
boolean |
isLabelBold()
Gets or sets a bool value that indicates whether the number of the
heading is bold.
|
void |
isLabelBold(boolean value) |
boolean |
isLabelItalic()
Gets or sets a bool value that indicates whether the number of the
heading is italic.
|
void |
isLabelItalic(boolean value) |
boolean |
isLabelUnderline()
Gets or sets a bool value that indicates whether the number of the
heading is underline.
|
void |
isLabelUnderline(boolean value) |
boolean |
isLabelUnicode()
Gets or sets a bool value that indicates whether the bullet/Label
uses a unicode character.
|
void |
isLabelUnicode(boolean value) |
boolean |
isPrefixed()
Gets or sets a bool value that indicates if the prefix of the number
is shown when using auto sequence.
|
void |
isPrefixed(boolean value) |
void |
setBackColorInTOC(Color value) |
void |
setBulletAlignment(int value) |
void |
setBulletColor(Color value) |
void |
setBulletFontName(String value) |
void |
setBulletOffset(float value) |
void |
setBulletTTFFile(String value) |
void |
setCaptionLebel(String value) |
void |
setHeadingType(int value) |
void |
setImageLabel(Image value) |
void |
setLabel(String value) |
void |
setLabelAlignment(int value) |
void |
setLabelColor(Color value) |
void |
setLabelFontName(String value) |
void |
setLabelFontSize(float value) |
void |
setLabelPattern(String value) |
void |
setLabelWidth(float value) |
void |
setLevel(int value) |
void |
setPdf(Pdf value) |
void |
setPreHeading(Heading value) |
void |
setStartNumber(int value) |
void |
setTOC(ListSection value) |
void |
setUserLabel(String value) |
completeClone, deepClone, getAdditionalHeightForRotating, getComposer, getCurrentFootNoteHeight, getDisplayType, getFirstLineIndent, getformfield, getGraphicState, getIfHtmlTagSupportedCssWinsOnFirstLevelChildren, getInlineRadioButtonBackgroundColor, getInlineRadioButtonBackgroundColorInternal, getInlineRadioButtonCheckedIndex, getInlineRadioButtonColor, getInlineRadioButtonColorInternal, getInlineRadioButtonFieldName, getLastSegmentIfAny, getOpacity, getRotatingAngle, getSegments, getTabStops, getTextHeight, getTextInfo, getTextWidth, getUseTextInfoStyle, getWrapLines, getZIndex, hasFootNote, hasFootNote, hasInline, hasInlineImage, hasInlineRadioButton, hasRightToLeftSeg, hasSplitedSegment, hasTABSymbol, isAlignedByWord, isAlignedByWord, isAutoHyphenated, isAutoHyphenated, isEmpty, isFitToPage, isFitToPage, isHtml5Supported, isHtml5Supported, isHtmlTagSupported, isHtmlTagSupported, isNeedRepeating, isNeedRepeating, isRealRTLText, isRealRTLText, isSimpleSegment, isSimpleSegment, isSpaced, isSpaced, isSvgEmbedded, isSvgEmbedded, isSymbolProcessed, isSymbolProcessed, isWidowOrphanControlEnabled, isWidowOrphanControlEnabled, setBackupFirstLineIndent, setCurrentFootNoteHeight, setDisplayType, setFirstLineIndent, setFontSizeForTextualChildren, setformfield, setIfHtmlTagSupportedCssWinsOnFirstLevelChildren, setInlineRadioButtonBackgroundColor, setInlineRadioButtonBackgroundColorInternal, setInlineRadioButtonCheckedIndex, setInlineRadioButtonColor, setInlineRadioButtonColorInternal, setInlineRadioButtonFieldName, setOpacity, setRotatingAngle, setSegments, setTabStops, setTextInfo, setTextNameForTextualChildren, setTextWidth, setUseTextInfoStyle, setWrapLines, setZIndex
copyTo, getBookmarked, getFootNoteProcessed, getHeight, getID, getLeft, getMargin, getNeedReprocess, getNextParagraphInHeading, getPageNumber, getParentCell, getPositioningType, getPosX, getPosY, getRealPageNumber, getReferencedParagraphWidth, getReferenceParagraphID, getRefPageNumber, getSection, getTop, getWidth, isDisabled, isDisabled, isEndNote, isFirstParagraph, isFirstParagraph, isFirstParagraphInColumn, isFirstParagraphInColumn, isFootNote, isFootNote, isInHeaderFooter, isInHeaderFooter, isInList, isInList, isKeptTogether, isKeptTogether, isKeptWithNext, isKeptWithNext, isOnOddPage, isOnOddPage, setBookmarked, setFootNoteProcessed, setHeight, setID, setLeft, setMargin, setNeedReprocess, setNextParagraphInHeading, setPageNumber, setParentCell, setParentIsTable, setPositioningType, setPosX, setPosY, setRealPageNumber, setReferencedParagraphWidth, setReferenceParagraphID, setRefPageNumber, setSection, setTop, setWidth
public boolean IsOnlyLebel
public float BakLabelWidth
public float RightMarginPosX
public boolean IsRTLHeading
public Heading()
Initializes a new instance of the Heading
class.
public Heading(Pdf pdf, Section section, int level)
Initializes a new instance of the Heading
class.
pdf
- The specified Pdf
object.section
- The specified Section
object.level
- The heading level. Section
object.
public float getRealLevel()
public boolean isAutoHyphenated_Heading_New()
Gets or sets a bool value that indicates whehter the text is hyphenated automatically.
public void isAutoHyphenated_Heading_New(boolean value)
public NumberArray getNumberArray()
Gets or sets a NumberArray
object that indicates the heading
number array.
public int getLevel()
Gets or sets an int value that indicates the level of the heading.
public void setLevel(int value)
public String getLabel()
Gets or sets an string value that indicates the user-defined heading label. If you want to use the charactor in the charactor set, please use #$UNICODE() . Set this property to 'bullet1','bullet2'...'bullet7' to use system-defined bullet. Example 1: Label = #$UNICODE(9633); //It will print �� Example 2: Label = 9633 ; //It will print 9633 Example 3: Label = bullet1; //It will print ��
public void setLabel(String value)
public String getCaptionLebel()
Gets or sets a string that indicates the heading label. Set this
property to 'bullet1','bullet2'...'bullet7' to use system-defined bullet.
Set this property to a number between 33 and 255(and set the
BulletFontName
too) to use user-defined bullet. null null <BLOCKQUOTE class="dtBlock">
<Font color="red">NOTE: This property is now obsolete.</Font></BLOCKQUOTE>
<BLOCKQUOTE class="dtBlock">
You should use Label to set the caption label.
It will be removed 12 months later since release 3.8.0.0 in September 2008.
Aspose apologizes for any inconvenience you may have experienced.
</BLOCKQUOTE>
public void setCaptionLebel(String value)
public float getLabelWidth()
Gets or sets a float value that indicates the width of the label of the heading. Default value is 30 points.
public void setLabelWidth(float value)
public float getBulletOffset()
Gets or sets a float value that indicates the offset of the bullet.
public void setBulletOffset(float value)
public Color getLabelColor()
Gets or sets a Color
value that indicates the color of the
bullet/label.
public void setLabelColor(Color value)
public int getLabelAlignment()
Gets or sets a AlignmentType
value that indicates the
alignment type of Bullet/Label.
public void setLabelAlignment(int value)
public int getBulletAlignment()
Gets or sets a AlignmentType
value that indicates the
alignment type of Bullet/Label. null null <BLOCKQUOTE class="dtBlock">
<Font color="red">NOTE: This property is now obsolete.</Font></BLOCKQUOTE>
<BLOCKQUOTE class="dtBlock">
You should use LabelAlignment to set the alignment type of Bullet/Label.
It will be removed 12 months later since release 3.6.2.0 in February 2008.
Aspose apologizes for any inconvenience you may have experienced.
</BLOCKQUOTE>
public void setBulletAlignment(int value)
public Color getBulletColor()
. Gets or sets a Color
value that indicates the color of the
bullet/label. null null <BLOCKQUOTE class="dtBlock">
<Font color="red">NOTE: This property is now obsolete.</Font></BLOCKQUOTE>
<BLOCKQUOTE class="dtBlock">
You should use LabelColor to set the color of bullet/label..
It will be removed 12 months later since release 3.6.2.0 in February 2008.
Aspose apologizes for any inconvenience you may have experienced.
</BLOCKQUOTE>
public void setBulletColor(Color value)
public boolean isLabelBold()
Gets or sets a bool value that indicates whether the number of the heading is bold.
public void isLabelBold(boolean value)
public boolean isLabelItalic()
Gets or sets a bool value that indicates whether the number of the heading is italic.
public void isLabelItalic(boolean value)
public boolean isLabelUnderline()
Gets or sets a bool value that indicates whether the number of the heading is underline.
public void isLabelUnderline(boolean value)
public String getLabelFontName()
Gets or sets a string value that indicates the font name of label.
public void setLabelFontName(String value)
public float getLabelFontSize()
Gets or sets a float value that indicates the font size of label.
public void setLabelFontSize(float value)
public boolean isAutoSequence()
Gets or sets a bool value that indicates whether the number of the heading is in an automatical sequence.
public void isAutoSequence(boolean value)
public void setPdf(Pdf value)
public int getHeadingType()
Gets or sets the aspose.pdf.HeadingType
of this heading.
public void setHeadingType(int value)
public String getUserLabel()
Gets or sets a string that indicates the caption label. For example,
UserLabel="1.3.5". Set this property to 'bullet1','bullet2'...'bullet7'
to use system-defined bullet. To use user defined lebel, Set the
BulletFontName
to "Symbol" and "ZapfDingbats" and set this
property to the char value of the bullt symbol. For
example,Userlabel="44" and BulletFontName="ZapfDingbats". null null <BLOCKQUOTE class="dtBlock">
<Font color="red">NOTE: This property is now obsolete.</Font></BLOCKQUOTE>
<BLOCKQUOTE class="dtBlock">
You should use Label to set the user label.
It will be removed 12 months later since release 3.8.0.0 in February 2008.
Aspose apologizes for any inconvenience you may have experienced.
</BLOCKQUOTE>
public void setUserLabel(String value)
public Image getImageLabel()
Gets or sets the an Image that is used as label.If ImageLabel is not null, the ImageLabel substitutes for number heading. The size of the ImageLabel will be adjusted following the Segment.TextInfo.FontSize.
public void setImageLabel(Image value)
public String getLabelPattern()
Gets or sets the heading pattern in the "ch(s)%ch(s)" form, ch(s) can be none ,an ASCII or a combination of ASCIIs, % stands for the heading number. For example, "(%)" means "(1.1)" if here % equals 1.1.
public void setLabelPattern(String value)
public void setPreHeading(Heading value)
public String getBulletFontName()
Gets or sets a string that indicates the font name for bullet.
"Symbol" and "ZapfDingbats" are supported. null null <BLOCKQUOTE class="dtBlock">
<Font color="red">NOTE: This property is now obsolete.</Font></BLOCKQUOTE>
<BLOCKQUOTE class="dtBlock">
You should use LabelFontName to set the font name for bullet.
It will be removed 12 months later since release 3.6.2.0 in February 2008.
Aspose apologizes for any inconvenience you may have experienced.
</BLOCKQUOTE>
public void setBulletFontName(String value)
public boolean isBulletUnicode()
Gets or sets a bool value that indicates whether the bullet/Label
uses a unicode character. null null <BLOCKQUOTE class="dtBlock">
<Font color="red">NOTE: This property is now obsolete.</Font></BLOCKQUOTE>
<BLOCKQUOTE class="dtBlock">
You should use isLabelUnicode to set whether the bullet/Label uses a unicode character.
It will be removed 12 months later since release 3.6.2.0 in February 2008.
Aspose apologizes for any inconvenience you may have experienced.
</BLOCKQUOTE>
public void isBulletUnicode(boolean value)
public boolean isLabelUnicode()
Gets or sets a bool value that indicates whether the bullet/Label uses a unicode character.
public void isLabelUnicode(boolean value)
public String getBulletTTFFile()
Gets or sets a string that indicates the truetype font file name for the bullet. This property is only needed when using truetype font with unicode. If your truetype font has been installed in your system, you can use truetype font with unicode without this property. But using this property will greatly improve the performance.
public void setBulletTTFFile(String value)
public boolean isInBookmark()
public int getStartNumber()
Gets or sets a int number that indicates the start number of this heading when using auto numbering.
public void setStartNumber(int value)
public boolean isPrefixed()
Gets or sets a bool value that indicates if the prefix of the number is shown when using auto sequence. For example,for a label "1.2.5", if this property is set to false, the label will be "5".
public void isPrefixed(boolean value)
public Color getBackColorInTOC()
Gets or sets a Color of the corresponding line in Table of Contents.
public void setBackColorInTOC(Color value)
public ListSection getTOC()
Gets or sets a corresponding Table of Contents.
public void setTOC(ListSection value)
public Object clone_Heading_New()
Clones a new Heading
object. Only format info of the Heading
is cloned.
Heading
objectpublic Object completeClone_Heading_New()
Clones a new Heading
object. both format info and content of
the Heading is cloned.
Heading
objectCopyright © 2016 Aspose. All Rights Reserved.