public class Section extends Object
Represents a section in a Pdf document.
[C#] Pdf pdf1 = new Pdf(); Section section1 = pdf1.Sections.Add(); Text text1 = new Text(section1,"This is text in section1."); text1.Margin.Top = 30; section1.Paragraphs.Add(text1); Section section2 = pdf1.Sections.Add(); section2.IsLandscape = true; Text text2 = new Text(section2,"This is text in section2."); text2.Margin.Top = 30; section2.Paragraphs.Add(text2); pdf1.Save(...); [Visual Basic] Dim pdf1 As Pdf = New Pdf() Dim section1 As Section = pdf1.Sections.Add() Dim text1 As Text = New Text(section1, "This is text in section1.") text1.Margin.Top = 30 section1.Paragraphs.Add(text1) Dim section2 As Section = pdf1.Sections.Add() section2.IsLandscape = True Dim text2 As Text = New Text(section2, "This is text in section2.") text2.Margin.Top = 30 section2.Paragraphs.Add(text2) pdf1.Save(...) [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section> <Text MarginTop="30"> <Segment> This is text in section1. </Segment> </Text> </Section> <Section IsLandscape="true"> <Text MarginTop="30"> <Segment> This is text in section2.. </Segment> </Text> </Section> </Pdf>
Modifier and Type | Field and Description |
---|---|
float |
CurColumnPosY
���section�ж��Columns����ÿ��Columnsû��ռ��ȫ��ҳ��߶ȣ�ʹ��#$NC���л����µ�Column������Ҫ
��¼��ǰsection��Y���꣬�Ա���һ��section�����λ�ÿ�ʼ��
|
int |
FirstPageNumber |
boolean |
IsFullPage
��ǵ�ǰ��Section�Ƿ�ռ�������һҳ������ҳ�棬�ڶ���������¡����������Ϊtrue������̵�section��IsNewPage
Ϊfalse����ǿ��IsNewPageΪtrue.
|
boolean |
IsNewPageCreated |
boolean |
IsWidowOrphanControlSet |
int |
PagesNumber |
float |
RealFooterMarginBottom |
float |
RealPageBottom |
Constructor and Description |
---|
Section()
Initializes a new instance of the
Section class. |
Section(Pdf pdf)
Initializes a new instance of the
Section class. |
Modifier and Type | Method and Description |
---|---|
void |
addParagraph(Paragraph para)
Add a paragraph into the section.
|
Object |
completeClone()
Clones a new
Section object. |
Object |
deepClone()
Clones a new
Section object. |
HeaderFooter |
getAdditionalEvenFooter()
Gets or sets a
HeaderFooter object that indicates the
additional even footer of the section. |
HeaderFooter |
getAdditionalEvenHeader()
Gets or sets a
HeaderFooter object that indicates the
additional even header of the section. |
HeaderFooter |
getAdditionalOddFooter()
Gets or sets a
HeaderFooter object that indicates the
additional odd footer of the section. |
HeaderFooter |
getAdditionalOddHeader()
Gets or sets a
HeaderFooter object that indicates the
additional odd header of the section. |
Color |
getBackgroundColor()
Gets or sets a
Aspose.Pdf.Color object that indicates the
background color of the section. |
String |
getBackgroundImageFile()
Gets or sets a string that indicates the background image file name.
|
float |
getBackgroundImageFixedWidth()
Gets or sets a float value that indicates the fixed width of the
background image.
|
int |
getBackgroundImageType()
Gets or sets a
ImageFileType enum that indicates the type of
the background image. |
String |
getBreakParaText() |
ColumnInfo |
getColumnInfo()
Gets or sets a
ColumnInfo object that indicates the columns
info. |
int |
getEndNoteNumberInSection() |
HeaderFooter |
getEvenFooter()
Gets or sets a
HeaderFooter object that indicates the even
footer of the section. |
HeaderFooter |
getEvenHeader()
Gets or sets a
HeaderFooter object that indicates the even
header of the section. |
int |
getFirstLineIndent()
Gets or sets an int value that indicates the blank space at the
beginning of the section.
|
PageSetup |
getFirstPageInfo()
Gets or sets a
PageInfo that indicates page info of the
section. |
int |
getFootNoteNumberInPage() |
int |
getFootNoteNumberInSection() |
GraphInfo |
getGraphInfo()
Gets or sets a
GraphInfo that indicates graph info of the
section. |
String |
getID()
Gets or sets a string that indicates the ID of the section.
|
Object |
getObjectByID(String ID)
Gets a object with specified ID in the section.
|
HeaderFooter |
getOddFooter()
Gets or sets a
HeaderFooter object that indicates the odd
footer of the section. |
HeaderFooter |
getOddHeader()
Gets or sets a
HeaderFooter object that indicates the odd
header of the section. |
int |
getPageCount() |
PageSetup |
getPageInfo()
Gets or sets a
PageInfo that indicates page info of the
section. |
int |
getPageRotatingAngle()
Gets or sets the number of degrees by which the page should be
rotated clockwise when displayed or printed.
|
Paragraphs |
getParagraphs()
Gets or sets a
GraphInfo collection that indicates all
paragraphs in the section. |
Pdf |
getPdf() |
int |
getStartingPageNumber()
Gets or sets a int value that indicates the starting page number of
the section.
|
TextInfo |
getTextInfo()
Gets or sets a
TextInfo that indicates text info of the
section. |
HeaderFooter |
getWatermark() |
boolean |
hasColumnLine()
Gets or sets a bool value that indicates the vertical line between
columns need to been added
|
void |
hasColumnLine(boolean value) |
HeaderFooter |
insertFooter(int type)
Insert footer of the section.
|
HeaderFooter |
insertHeader(int type)
Insert Header of the section.
|
boolean |
isAutoHyphenated()
Gets or sets a bool value that indicates whehter the text is
hyphenated automatically.
|
void |
isAutoHyphenated(boolean value) |
boolean |
isBackgroundImageBlackWhite()
Gets or sets a bool value that indicates whether the image is forced
to be black-and-white.
|
void |
isBackgroundImageBlackWhite(boolean value) |
boolean |
isDisabled()
Gets or sets a bool value that indicates whether this section is
disabled.
|
void |
isDisabled(boolean value) |
boolean |
isEmpty() |
boolean |
isFirstParaWritten()
Indicates whether the first paragraph of the section has been
written.
|
void |
isFirstParaWritten(boolean value) |
boolean |
isHasNextColumnFlag() |
void |
isHasNextColumnFlag(boolean value) |
boolean |
isLandscape()
Gets or sets a bool value that indicates whether the page orientation
is landscape.
|
void |
isLandscape(boolean value) |
boolean |
isNewColumn()
Gets or sets a bool value that indicates whether the section starts
at new column.Default is true.
|
void |
isNewColumn(boolean value) |
boolean |
isNewPage()
Gets or sets a bool value that indicates whether the section starts a
new page.
|
void |
isNewPage(boolean value) |
boolean |
isPageNumberRestarted()
Gets or sets a bool value that indicates whether the page number is
restarted at this section.
|
void |
isPageNumberRestarted(boolean value) |
boolean |
isSameSize(Section sec) |
boolean |
isSpaced()
Gets or sets a bool value that indicates whether the spaces at the
begin of the text and returns in the text be shown.
|
void |
isSpaced(boolean value) |
boolean |
isWidowOrphanControlEnabled()
Gets or sets a bool value that indicates whether the Widow/Orphan
control is enabled.
|
void |
isWidowOrphanControlEnabled(boolean value) |
void |
setAdditionalEvenFooter(HeaderFooter value) |
void |
setAdditionalEvenHeader(HeaderFooter value) |
void |
setAdditionalOddFooter(HeaderFooter value) |
void |
setAdditionalOddHeader(HeaderFooter value) |
void |
setBackgroundColor(Color value) |
void |
setBackgroundImageFile(String value) |
void |
setBackgroundImageFixedWidth(float value) |
void |
setBackgroundImageType(int value) |
void |
setBreakParaText(String value) |
void |
setColumnInfo(ColumnInfo value) |
void |
setEndNoteNumberInSection(int value) |
void |
setEvenFooter(HeaderFooter value) |
void |
setEvenHeader(HeaderFooter value) |
void |
setFirstLineIndent(int value) |
void |
setFirstPageInfo(PageSetup value) |
void |
setFootNoteNumberInPage(int value) |
void |
setFootNoteNumberInSection(int value) |
void |
setGraphInfo(GraphInfo value) |
void |
setID(String value) |
void |
setOddFooter(HeaderFooter value) |
void |
setOddHeader(HeaderFooter value) |
void |
setPageCount(int value) |
void |
setPageInfo(PageSetup value) |
void |
setPageRotatingAngle(int value) |
void |
setParagraphs(Paragraphs value) |
void |
setStartingPageNumber(int value) |
void |
setTextInfo(TextInfo value) |
public float RealPageBottom
public boolean IsWidowOrphanControlSet
public int PagesNumber
public int FirstPageNumber
public boolean IsNewPageCreated
public float CurColumnPosY
���section�ж��Columns����ÿ��Columnsû��ռ��ȫ��ҳ��߶ȣ�ʹ��#$NC���л����µ�Column������Ҫ ��¼��ǰsection��Y���꣬�Ա���һ��section�����λ�ÿ�ʼ��
public boolean IsFullPage
��ǵ�ǰ��Section�Ƿ�ռ�������һҳ������ҳ�棬�ڶ���������¡����������Ϊtrue������̵�section��IsNewPage Ϊfalse����ǿ��IsNewPageΪtrue.
public float RealFooterMarginBottom
public Section()
Initializes a new instance of the Section
class.
public Section(Pdf pdf)
Initializes a new instance of the Section
class.
pdf
- The pdf document object. Pdf
object. public boolean isAutoHyphenated()
Gets or sets a bool value that indicates whehter the text is hyphenated automatically.
public void isAutoHyphenated(boolean value)
public PageSetup getPageInfo()
Gets or sets a PageInfo
that indicates page info of the
section.
public void setPageInfo(PageSetup value)
public String getBreakParaText()
public void setBreakParaText(String value)
public PageSetup getFirstPageInfo()
Gets or sets a PageInfo
that indicates page info of the
section.
public void setFirstPageInfo(PageSetup value)
public boolean isSameSize(Section sec)
public TextInfo getTextInfo()
Gets or sets a TextInfo
that indicates text info of the
section.
public void setTextInfo(TextInfo value)
public Pdf getPdf()
public boolean isFirstParaWritten()
Indicates whether the first paragraph of the section has been written.
public void isFirstParaWritten(boolean value)
public void addParagraph(Paragraph para)
Add a paragraph into the section. This method is used in direct-to-file mode.That means all paragraphs will be rendered into pdf file without being saved in the document object model. Less memory will be consumed in this mode,but you can't access the paragraphs that be added into the document any more, so some of the advanced features such as combination of XML and API,hyperlink to specified paragraph,total page number in footer,etc.,is not available.
para
- The paragraph to be added.public GraphInfo getGraphInfo()
Gets or sets a GraphInfo
that indicates graph info of the
section.
public void setGraphInfo(GraphInfo value)
public Paragraphs getParagraphs()
Gets or sets a GraphInfo
collection that indicates all
paragraphs in the section.
public void setParagraphs(Paragraphs value)
public HeaderFooter getOddHeader()
Gets or sets a HeaderFooter
object that indicates the odd
header of the section.
public void setOddHeader(HeaderFooter value)
public HeaderFooter getEvenHeader()
Gets or sets a HeaderFooter
object that indicates the even
header of the section.
public void setEvenHeader(HeaderFooter value)
public HeaderFooter getOddFooter()
Gets or sets a HeaderFooter
object that indicates the odd
footer of the section.
public void setOddFooter(HeaderFooter value)
public HeaderFooter getEvenFooter()
Gets or sets a HeaderFooter
object that indicates the even
footer of the section.
public void setEvenFooter(HeaderFooter value)
public int getFirstLineIndent()
Gets or sets an int value that indicates the blank space at the beginning of the section.
public void setFirstLineIndent(int value)
public boolean isSpaced()
Gets or sets a bool value that indicates whether the spaces at the begin of the text and returns in the text be shown. For the following XML:
<Text> <Segment>The first line, The second line.</Segment> </Text>If IsSpaced is false, the result will be:
The first line,The second line.If IsSpaced is true, the result will be:
The first line, The second line.
public void isSpaced(boolean value)
public String getID()
Gets or sets a string that indicates the ID of the section.
public void setID(String value)
public boolean isDisabled()
Gets or sets a bool value that indicates whether this section is disabled. The default value is false. If this property is set to true, this section will not be rendered.
public void isDisabled(boolean value)
public boolean isWidowOrphanControlEnabled()
Gets or sets a bool value that indicates whether the Widow/Orphan control is enabled. Default is true. If it is true, Widow/Orphan control is enabled and Widows/orphans themselves are eliminated (disabled).
public void isWidowOrphanControlEnabled(boolean value)
public int getFootNoteNumberInSection()
public void setFootNoteNumberInSection(int value)
public int getFootNoteNumberInPage()
public void setFootNoteNumberInPage(int value)
public boolean isHasNextColumnFlag()
public void isHasNextColumnFlag(boolean value)
public int getEndNoteNumberInSection()
public void setEndNoteNumberInSection(int value)
public HeaderFooter insertHeader(int type)
Insert Header of the section.
type
- The type of the header.public HeaderFooter insertFooter(int type)
Insert footer of the section.
type
- The type of the header.public String getBackgroundImageFile()
Gets or sets a string that indicates the background image file name.
public void setBackgroundImageFile(String value)
public Color getBackgroundColor()
Gets or sets a Aspose.Pdf.Color
object that indicates the
background color of the section.
public void setBackgroundColor(Color value)
public int getBackgroundImageType()
Gets or sets a ImageFileType
enum that indicates the type of
the background image.
public void setBackgroundImageType(int value)
public boolean isLandscape()
Gets or sets a bool value that indicates whether the page orientation is landscape. The default is false, portrait.
public void isLandscape(boolean value)
public HeaderFooter getAdditionalOddFooter()
Gets or sets a HeaderFooter
object that indicates the
additional odd footer of the section. If the first page needs one footer
style, the subsequent pages need another footer style, the additional
footer is needed.
public void setAdditionalOddFooter(HeaderFooter value)
public HeaderFooter getAdditionalEvenFooter()
Gets or sets a HeaderFooter
object that indicates the
additional even footer of the section. If the first page needs one footer
style, the subsequent pages need another footer style, the additional
footer is needed.
public void setAdditionalEvenFooter(HeaderFooter value)
public HeaderFooter getAdditionalOddHeader()
Gets or sets a HeaderFooter
object that indicates the
additional odd header of the section. If the first page needs one header
style, the subsequent pages need another header style, the additional
header is needed.
public void setAdditionalOddHeader(HeaderFooter value)
public HeaderFooter getAdditionalEvenHeader()
Gets or sets a HeaderFooter
object that indicates the
additional even header of the section. If the first page needs one header
style, the subsequent pages need another header style, the additional
header is needed.
public void setAdditionalEvenHeader(HeaderFooter value)
public float getBackgroundImageFixedWidth()
Gets or sets a float value that indicates the fixed width of the background image. If this property is not set, the real image size will be used as page size.
public void setBackgroundImageFixedWidth(float value)
public boolean isBackgroundImageBlackWhite()
Gets or sets a bool value that indicates whether the image is forced to be black-and-white. If black-and-white TIFF image of CCITT subformat is used, this property must be set to true.
public void isBackgroundImageBlackWhite(boolean value)
public boolean isNewPage()
Gets or sets a bool value that indicates whether the section starts a new page. The default value is true.
public void isNewPage(boolean value)
public int getPageRotatingAngle()
Gets or sets the number of degrees by which the page should be rotated clockwise when displayed or printed. The value must be a multiple of 90. Default value is 0.
public void setPageRotatingAngle(int value)
public boolean hasColumnLine()
Gets or sets a bool value that indicates the vertical line between columns need to been added
public void hasColumnLine(boolean value)
public ColumnInfo getColumnInfo()
Gets or sets a ColumnInfo
object that indicates the columns
info.
public void setColumnInfo(ColumnInfo value)
public Object getObjectByID(String ID)
Gets a object with specified ID in the section.
ID
- The object ID.public boolean isPageNumberRestarted()
Gets or sets a bool value that indicates whether the page number is restarted at this section. //zyqw:
public void isPageNumberRestarted(boolean value)
public boolean isNewColumn()
Gets or sets a bool value that indicates whether the section starts at new column.Default is true. If this property is set to false, please make sure the section has the same column setting as the former section.
public void isNewColumn(boolean value)
public int getStartingPageNumber()
Gets or sets a int value that indicates the starting page number of the section. Default is 1.
public void setStartingPageNumber(int value)
public Object deepClone()
Clones a new Section
object. Section format info is cloned
but paragraphs are not cloned.
Section
object.public Object completeClone()
Clones a new Section
object. Both format and paragraphs are
cloned.
Section
object.public HeaderFooter getWatermark()
public boolean isEmpty()
public int getPageCount()
public void setPageCount(int value)
Copyright © 2016 Aspose. All Rights Reserved.