public class Sections
extends com.aspose.ms.System.Collections.CollectionBase
Represents a collection of Section
objects.
[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>
Constructor and Description |
---|
Sections()
Initializes a new instance of the
Sections class. |
Modifier and Type | Method and Description |
---|---|
Section |
add()
Initializes a new instance of the
Section class and add it to the Sections collection |
void |
add(Section section)
Adds a new
Section object into the collection. |
void |
copyTo(Section[] secArray,
int index)
Copies the elements to a
Section object array, starting at a specified array index. |
Section |
get_Item(int index)
Gets or sets a
Section object from the collection according to Section index. |
Section |
get_Item(String sectionID)
Gets or sets a
Section object from the collection according to Section ID. |
int |
indexOf(Section section)
Gets the index of a specified section in the collection.
|
void |
insert(int index,
Section section)
Inserts a new
Section object into the collection at specified position. |
void |
insert(Section sectionToInsertAfter,
Section newSection)
Inserts a new
Section object into the collection after specified Section object. |
void |
remove(Section sectionToRemove)
Removes a
Section object from the collection. |
void |
set_Item(int index,
Section value) |
void |
set_Item(String sectionID,
Section value) |
public void add(Section section)
Adds a new Section
object into the collection.
section
- The Section
object to be added.public Section add()
Initializes a new instance of the Section
class and add it to the Sections collection
Section
object.public void insert(int index, Section section)
Inserts a new Section
object into the collection at specified position.
index
- The zero-based index at which Section
object should be inserted.section
- The Section
object to be inserted.public void insert(Section sectionToInsertAfter, Section newSection)
Inserts a new Section
object into the collection after specified Section object.
sectionToInsertAfter
- The Section
object to insert after.newSection
- The Section
object to be inserted.public void remove(Section sectionToRemove)
Removes a Section
object from the collection.
sectionToRemove
- The Section
object to be romoved.public void copyTo(Section[] secArray, int index)
Copies the elements to a Section
object array, starting at a specified array index.
secArray
- The Section
object array.index
- The start index.public int indexOf(Section section)
Gets the index of a specified section in the collection.
section
- The specified section.public Section get_Item(int index)
Gets or sets a Section
object from the collection according to Section index.
get_Item
in interface com.aspose.ms.System.Collections.IList
get_Item
in class com.aspose.ms.System.Collections.CollectionBase
public void set_Item(int index, Section value)
public Section get_Item(String sectionID)
Gets or sets a Section
object from the collection according to Section ID.
Copyright © 2016 Aspose. All Rights Reserved.