public class Heading extends Text
Represents a heading in Pdf document.
[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); Heading heading1 = new Heading(pdf1,sec1,1); Segment segment1 = new Segment(heading1); heading1.getSegments().add(segment1); heading1.setIsAutoSequence ( true); segment1.setContent ( "this is heading of level 1"); sec1.getParagraphs().add(heading1); //please make sure all properties are set before Add Heading heading2 = new Heading(pdf1,sec1,2); Segment segment2 = new Segment(heading2); heading2.getSegments().add(segment2); heading2.setIsAutoSequence ( true); segment2.setContent ( "this is heading of level 2"); sec1.getParagraphs().add(heading2); //please make sure all properties are set before Add Heading heading3 = new Heading(pdf1,sec1,1); Segment segment3 = new Segment(heading3); heading3.getSegments().add(segment3); heading3.setIsAutoSequence ( false); heading3.setLabelWidth ( 60); heading3.setUserLabel ( "bullet1"); segment3.setContent ( "this is bullet style 1"); sec1.getParagraphs().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>
Modifier and Type | Field and Description |
---|---|
int |
_HeadingType
Gets or sets the
Aspose.Pdf.Generator.LegacyXmlModel.HeadingType (style of figures)of this heading. |
Color |
BackColorInTOC
Gets or sets a Color of the corresponding line in Table of Contents.
|
String |
BulletFontName
Gets or sets a string that indicates the font name for bullet.
|
float |
BulletOffset
Gets or sets a float value that indicates the offset of the bullet.
|
String |
BulletTTFFile
Gets or sets a string that indicates the truetype font file name for the bullet.
|
Image |
ImageLabel
Gets or sets the an Image that is used as label.If ImageLabel is not null, the ImageLabel substitutes for number heading.
|
boolean |
IsAutoSequence
Gets or sets a bool value that indicates whether the number of the heading is in an automatical sequence.
|
boolean |
IsBulletUnicode
Gets or sets a bool value that indicates whether the bullet/Label uses a unicode character.
|
boolean |
IsLabelBold
Gets or sets a bool value that indicates whether the number of the heading is bold.
|
boolean |
IsLabelItalic
Gets or sets a bool value that indicates whether the number of the heading is italic.
|
boolean |
IsLabelUnderline
Gets or sets a bool value that indicates whether the number of the heading is underline.
|
boolean |
IsPrefixed
Gets or sets a bool value that indicates if the prefix of the number is shown when using
auto sequence.
|
String |
Label
Gets or sets an string value that indicates the user-defined heading label.
|
float |
LabelFontSize
Gets or sets a float value that indicates the font size of label.
|
String |
LabelPattern
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.
|
int |
Level
Gets or sets an int value that indicates the level of the heading.
|
int |
StartNumber
Gets or sets a int number that indicates the start number of this heading when using auto numbering.
|
ListSection |
TOC
Gets or sets a corresponding Table of Contents.
|
FirstLineIndent, IfHtmlTagSupportedCssWinsOnFirstLevelChildren, IfHtmlTagSupportedOverwrightHtmlFontNames, IfHtmlTagSupportedOverwrightHtmlFontSizes, InlineRadioButtonBackgroundColor, InlineRadioButtonColor, InlineRadioButtonFieldName, IsAlignedByWord, IsAutoHyphenated, IsFitToPage, IsHtml5Supported, IsHtmlTagSupported, IsNeedRepeating, IsSpaced, IsSvgEmbedded, IsWidowOrphanControlEnabled, Opacity, RotatingAngle, Segments, TabStops, TextWidth, UseTextInfoStyle, WrapLines, ZIndex
_PositioningType, FixedHeight, FixedWidth, ID, IsDisabled, IsFirstParagraph, IsFirstParagraphInColumn, IsInList, IsKeptTogether, IsKeptWithNext, IsOnOddPage, Left, Margin, ReferenceParagraphID, Top
Constructor and Description |
---|
Heading(LegacyPdf 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. |
int |
getBulletAlignment()
Deprecated.
|
Color |
getBulletColor()
.
|
int |
getBulletHorizontalAlignment() |
int |
getLabelAlignment()
Gets or sets a
TextAlignmentType 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.
|
int |
getLabelHorizontalAlignment() |
float |
getLabelWidth()
Gets or sets a float value that indicates the width of the label of the heading.
|
String |
getUserLabel()
Gets or sets a string that indicates the caption label.
|
boolean |
isLabelUnicode()
Gets or sets a bool value that indicates whether the bullet/Label uses a unicode character.
|
void |
setBulletAlignment(int value)
Deprecated.
|
void |
setBulletColor(Color value) |
void |
setBulletHorizontalAlignment(int value) |
void |
setLabelAlignment(int value) |
void |
setLabelColor(Color value) |
void |
setLabelFontName(String value) |
void |
setLabelHorizontalAlignment(int value) |
void |
setLabelUnicode(boolean value) |
void |
setLabelWidth(float value) |
void |
setUserLabel(String value) |
completeClone, deepClone, getInlineRadioButtonCheckedIndex, getTextInfo, setFontSizeForTextualChildren, setInlineRadioButtonCheckedIndex, setTextInfo, setTextNameForTextualChildren
copyTo, getBookmarked, setBookmarked
load
public int Level
Gets or sets an int value that indicates the level of the heading.
public String Label
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 float BulletOffset
Gets or sets a float value that indicates the offset of the bullet.
public boolean IsLabelBold
Gets or sets a bool value that indicates whether the number of the heading is bold.
public boolean IsLabelItalic
Gets or sets a bool value that indicates whether the number of the heading is italic.
public boolean IsLabelUnderline
Gets or sets a bool value that indicates whether the number of the heading is underline.
public float LabelFontSize
Gets or sets a float value that indicates the font size of label.
public boolean IsAutoSequence
Gets or sets a bool value that indicates whether the number of the heading is in an automatical sequence.
public int _HeadingType
Gets or sets the Aspose.Pdf.Generator.LegacyXmlModel.HeadingType
(style of figures)of this heading.
public Image ImageLabel
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 String LabelPattern
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 String BulletFontName
Gets or sets a string that indicates the font name for bullet. "Symbol" and "ZapfDingbats"
are supported.
<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 boolean IsBulletUnicode
Gets or sets a bool value that indicates whether the bullet/Label uses a unicode character.
<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 String BulletTTFFile
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 int StartNumber
Gets or sets a int number that indicates the start number of this heading when using auto numbering.
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 Color BackColorInTOC
Gets or sets a Color of the corresponding line in Table of Contents.
public ListSection TOC
Gets or sets a corresponding Table of Contents.
public Heading(LegacyPdf 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 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 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 TextAlignmentType
value that indicates the alignment type of Bullet/Label.
public void setLabelAlignment(int value)
public int getLabelHorizontalAlignment()
public void setLabelHorizontalAlignment(int value)
@Deprecated public int getBulletAlignment()
Gets or sets a TextAlignmentType
value that indicates the alignment type of Bullet/Label.
<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>
AlignmentType
@Deprecated public void setBulletAlignment(int value)
public int getBulletHorizontalAlignment()
public void setBulletHorizontalAlignment(int value)
public Color getBulletColor()
.
Gets or sets a Color
value that indicates the color of the bullet/label.
<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 String getLabelFontName()
Gets or sets a string value that indicates the font name of label.
public void setLabelFontName(String 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".
<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 boolean isLabelUnicode()
Gets or sets a bool value that indicates whether the bullet/Label uses a unicode character.
public void setLabelUnicode(boolean value)
public Object clone_Heading_New()
Clones a new Heading
object. Only format info of the Heading is cloned.
Heading
objectCopyright © 2014 Aspose. All Rights Reserved.