public class Paragraphs
extends com.aspose.ms.System.Collections.CollectionBase
Represents a collection of Paragraph
objects.
[C#] Pdf pdf = new Pdf(); pdf.Security = new Security(); pdf.Security.IsCopyingAllowed = false; pdf.PageSetup.PageHeight = PageSize.A2Height; Section section = new Section(pdf); pdf.Sections.Add(section); Text text1 = new Text(section); text1.Margin.Top = 30; section.Paragraphs.Add(text1); Segment segment1 = new Segment(text1); text1.Segments.Add(segment1); segment1.Content = "this is text content"; pdf.Save(Response); Response.End(); [Visual Basic] Dim pdf As Pdf = New Pdf() pdf.Security = New Security() pdf.Security.IsCopyingAllowed = False pdf.PageSetup.PageHeight = PageSize.A2Height Dim section As Section = New Section(pdf) pdf.Sections.Add(section) Dim text1 As Text = New Text(section) text1.Margin.Top = 30 section.Paragraphs.Add(text1) Dim segment1 As Segment = New Segment(text1) text1.Segments.Add(segment1) segment1.Content = "this is text content" pdf.Save(Response) Response.End() [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf" IsCopyingAllowed="false"> <Section PageHeight="1684"> <Text MarginTop="30"> <Segment>this is text content</Segment> </Text> </Section> </Pdf>
Constructor and Description |
---|
Paragraphs()
Initializes a new instance of the
Paragraphs class. |
Modifier and Type | Method and Description |
---|---|
void |
add(Paragraph paragraph)
Adds a new
Paragraph object into the collection. |
void |
addPara(Paragraph paragraph)
Adds a new
Paragraph object into the collection. |
void |
combineBorder() |
void |
copyTo(Paragraph[] paraArray,
int index)
Copies the elements to a
Paragraph object array, starting at a specified array index. |
void |
createNextParaLink() |
Paragraph |
get_Item(int index)
Gets or sets a
Paragraph object from the collection according to Paragraph index. |
Paragraph |
get_Item(String paragraphID)
Gets or sets a
Paragraph object from the collection according to Paragraph ID. |
Object |
getObjectByID(String ID) |
int |
indexOf(Paragraph paragraph)
Gets the index of a specified
Paragraph object in the collection. |
void |
insert(Paragraph paragraphToInsertAfter,
Paragraph newParagraph)
Inserts a new
Paragraph object into the collection after specified Cell object. |
void |
insertPara(int index,
Paragraph paragraph)
Inserts a new
Paragraph object into the collection at specified position. |
void |
insertPara(Paragraph paragraphToInsertAfter,
Paragraph newParagraph)
Inserts a new
Paragraph object into the collection after specified Cell object. |
void |
moveAt(Paragraph paragraphToMoveAt,
Paragraphs newParagraphs) |
Paragraph |
nextParagraph(Paragraph paragraph) |
void |
processAutoSequence(Heading heading) |
void |
remove(Paragraph paragraphToRemove)
Removes a
Paragraph object from the collection. |
void |
set_Item(int index,
Paragraph value) |
void |
set_Item(String paragraphID,
Paragraph value) |
public Paragraphs()
Initializes a new instance of the Paragraphs
class.
public void add(Paragraph paragraph)
Adds a new Paragraph
object into the collection.
paragraph
- The Paragraph
object to be added.public void addPara(Paragraph paragraph)
Adds a new Paragraph
object into the collection.
paragraph
- The Paragraph
object to be added.public Paragraph get_Item(int index)
Gets or sets a Paragraph
object from the collection according to Paragraph 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, Paragraph value)
public Paragraph get_Item(String paragraphID)
Gets or sets a Paragraph
object from the collection according to Paragraph ID.
public int indexOf(Paragraph paragraph)
Gets the index of a specified Paragraph
object in the collection.
paragraph
- The specified paragraph.public void insertPara(int index, Paragraph paragraph)
Inserts a new Paragraph
object into the collection at specified position.
index
- The zero-based index at witch Paragraph
object should be inserted.paragraph
- The Paragraph
object to be inserted.public void insertPara(Paragraph paragraphToInsertAfter, Paragraph newParagraph)
Inserts a new Paragraph
object into the collection after specified Cell object.
paragraphToInsertAfter
- The Paragraph
object to insert after.newParagraph
- The Paragraph
object to be inserted.public void insert(Paragraph paragraphToInsertAfter, Paragraph newParagraph)
Inserts a new Paragraph
object into the collection after specified Cell object.
paragraphToInsertAfter
- The Paragraph
object to insert after.
If this object is null, the new object will be inserted as the first member.newParagraph
- The Paragraph
object to be inserted.public void remove(Paragraph paragraphToRemove)
Removes a Paragraph
object from the collection.
paragraphToRemove
- The Paragraph
object to be romoved.public void moveAt(Paragraph paragraphToMoveAt, Paragraphs newParagraphs)
paragraphToMoveAt
- newParagraphs
- public void copyTo(Paragraph[] paraArray, int index)
Copies the elements to a Paragraph
object array, starting at a specified array index.
paraArray
- The Paragraph
object array.index
- The starting index.public void processAutoSequence(Heading heading)
heading
- public void combineBorder()
public void createNextParaLink()
Copyright © 2016 Aspose. All Rights Reserved.