public abstract class Paragraph extends Object
Represents a paragraph object.
[C#] // Create an object of Pdf class Pdf pdf = new Pdf(); // Create a section object Aspose.Pdf.Generator.Section section = new Aspose.Pdf.Generator.Section(pdf); // add the section to Pdf object pdf.Sections.Add(section); // create a simple text object Text text1 = new Text(section); // specify the top margin information for text object text1.Margin.Top = 30; // add the text paragraph to paragraphs collection of section object section.Paragraphs.Add(text1); // create a new segment object Segment segment1 = new Segment(text1); // add the newly created segment to segments collection of text object text1.Segments.Add(segment1); // specify the contents of segment segment1.Content = "this is text content"; // Add a text paragraph to paragraphs collection of section object section.Paragraphs.Add(new Text("This Paragraph should be on second page")); // specify that the paragraph is the first paragraph and will be displayed over new page section.Paragraphs[1].IsFirstParagraph = true; // save the PDF document pdf.Save("d:/pdftest/ListSectionTestTocXml.pdf"); [Visual Basic] ' Create an object of Pdf class Dim pdf As Pdf = New Pdf() ' Create a section object Dim Section As Aspose.Pdf.Generator.Section = New Aspose.Pdf.Generator.Section(pdf) ' add the section to Pdf object pdf.Sections.Add(Section) ' create a simple text object Dim text1 As Text = New Text(Section) ' specify the top margin information for text object text1.Margin.Top = 30 ' add the text paragraph to paragraphs collection of section object Section.Paragraphs.Add(text1) ' create a new segment object Dim segment1 As Segment = New Segment(text1) ' add the newly created segment to segments collection of text object text1.Segments.Add(segment1) ' specify the contents of segment segment1.Content = "this is text content" ' Add a text paragraph to paragraphs collection of section object Section.Paragraphs.Add(New Text("This Paragraph should be on second page")) ' specify that the paragraph is the first paragraph and will be displayed over new page Section.Paragraphs(1).IsFirstParagraph = True ' save the PDF document pdf.Save("d:/pdftest/ListSectionTestTocXml.pdf") [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> <Text IsFirstParagraph="True"> <Segment>This Paragraph should be on second page</Segment> </Text> </Section> </Pdf>
Modifier and Type | Class and Description |
---|---|
static class |
Paragraph.VerticalPositionInfo
for Text MarginInfo
|
Modifier and Type | Field and Description |
---|---|
float |
absolutePosX
Absolute area positioning
|
float |
absolutePosY
Absolute area positioning
|
com.aspose.ms.System.Drawing.Rectangle |
ClippingArea
Keeps clip rectangle
|
float |
FixedHeight |
float |
FixedWidth |
boolean |
isAbsoluteLayout
Used for absolute positioning area
|
boolean |
isFixedLayout
Used for fixed positioning area
|
boolean |
IsNeedAddToPage |
boolean |
IsPositionGot |
boolean |
IsPositionProcessed |
boolean |
isRelativeLayout
Used for relative positioning area
|
boolean |
MayNeedReprocess |
Paragraph |
NextParagraph |
float |
posBottom
Area positioning
|
float |
posLeft
Area positioning
|
float |
posRight
Area positioning
|
float |
posTop
Area positioning
|
Paragraph |
RefPara |
float |
relativePosX
Relative area positioning
|
float |
relativePosY
Relative area positioning
|
Paragraph.VerticalPositionInfo |
VerticalPosInfo |
Constructor and Description |
---|
Paragraph()
Initializes a new instance of the
Paragraph class. |
Modifier and Type | Method and Description |
---|---|
abstract Object |
completeClone() |
void |
copyTo(Paragraph par) |
int |
getBookmarked()
Get or set a bool value that indicates whether this paragraph is used as a bookmark item.
|
aspose.pdf.general.composer.ContentComposer |
getComposer() |
boolean |
getFootNoteProcessed() |
float |
getHeight() |
String |
getID()
Gets or sets a string that indicates the ID of the paragraph.
|
float |
getLeft()
Gets or sets a float value that indicates the left position of the paragraph.
|
MarginInfo |
getMargin()
Gets or sets
MarginInfo object that indicates the margin info of the paragraph. |
boolean |
getNeedReprocess() |
Paragraph |
getNextParagraphInHeading()
Gets or sets a
Paragraph object that indicates the next paragraph in heading link. |
int |
getPageNumber() |
Cell |
getParentCell() |
int |
getPositioningType()
The positioning type for custom positioning.
|
float |
getPosX() |
float |
getPosY()
Gets or sets a float value that indicates the y-coordinate of the paragraph beginning position.
|
int |
getRealPageNumber() |
float |
getReferencedParagraphWidth() |
String |
getReferenceParagraphID()
Gets or sets a string that indicates the reference paragraph when using paragraph relative customer
positioning.
|
String |
getRefPageNumber()
Gets or sets a string value that indicates the page number of the paragraph which is a reference paragraph..
|
Section |
getSection() |
float |
getTop()
Gets or sets a float value that indicates the top position of the paragraph.
|
float |
getWidth() |
boolean |
isDisabled()
Gets or sets a bool value that indicates whether this paragraph is disabled.
|
void |
isDisabled(boolean value) |
boolean |
isEndNote()
get or set a bool value that indicates if the current Text is endnote.
|
boolean |
isFirstParagraph()
Gets or sets a bool value that indicates whether the paragraph is the first paragraph of a page.
|
void |
isFirstParagraph(boolean value) |
boolean |
isFirstParagraphInColumn()
Gets or sets a bool value that indicates whether the paragraph be the first paragraph of a column.
|
void |
isFirstParagraphInColumn(boolean value) |
boolean |
isFootNote() |
void |
isFootNote(boolean value) |
boolean |
isInHeaderFooter() |
void |
isInHeaderFooter(boolean value) |
boolean |
isInList()
Get or set a bool value that indicates whether this paragraph is used as a list item.
|
void |
isInList(boolean value) |
boolean |
isKeptTogether()
Gets or sets a bool value that indicates whether all lines
in the paragraph are to remain on the same page.
|
void |
isKeptTogether(boolean value) |
boolean |
isKeptWithNext()
Gets or sets a bool value that indicates whether current paragraph remains in the same page along with next paragraph.
|
void |
isKeptWithNext(boolean value) |
boolean |
isOnOddPage()
Gets or sets a bool value that indicates whether this paragraph be shown in odd page only.
|
void |
isOnOddPage(boolean value) |
void |
setBookmarked(int value) |
void |
setFootNoteProcessed(boolean value) |
void |
setHeight(float value) |
void |
setID(String value) |
void |
setLeft(float value) |
void |
setMargin(MarginInfo value) |
void |
setNeedReprocess(boolean value) |
void |
setNextParagraphInHeading(Paragraph value) |
void |
setPageNumber(int value) |
void |
setParentCell(Cell value) |
void |
setParentIsTable(boolean value) |
void |
setPositioningType(int value) |
void |
setPosX(float value) |
void |
setPosY(float value) |
void |
setRealPageNumber(int value) |
void |
setReferencedParagraphWidth(float value) |
void |
setReferenceParagraphID(String value) |
void |
setRefPageNumber(String value) |
void |
setSection(Section value) |
void |
setTop(float value) |
void |
setWidth(float value) |
public com.aspose.ms.System.Drawing.Rectangle ClippingArea
Keeps clip rectangle
public float relativePosX
Relative area positioning
public float relativePosY
Relative area positioning
public float absolutePosX
Absolute area positioning
public float absolutePosY
Absolute area positioning
public float posLeft
Area positioning
public float posRight
Area positioning
public float posTop
Area positioning
public float posBottom
Area positioning
public boolean isAbsoluteLayout
Used for absolute positioning area
public boolean isRelativeLayout
Used for relative positioning area
public boolean isFixedLayout
Used for fixed positioning area
public Paragraph RefPara
public boolean IsPositionGot
public boolean IsNeedAddToPage
public boolean IsPositionProcessed
public boolean MayNeedReprocess
public Paragraph.VerticalPositionInfo VerticalPosInfo
public Paragraph NextParagraph
public float FixedHeight
public float FixedWidth
public abstract Object completeClone()
public aspose.pdf.general.composer.ContentComposer getComposer()
public void setParentIsTable(boolean value)
public boolean getFootNoteProcessed()
public void setFootNoteProcessed(boolean value)
public boolean isFootNote()
public void isFootNote(boolean value)
public boolean isEndNote()
get or set a bool value that indicates if the current Text is endnote.
public Section getSection()
public void setSection(Section value)
public Cell getParentCell()
public void setParentCell(Cell value)
public MarginInfo getMargin()
Gets or sets MarginInfo
object that indicates the margin info of the paragraph.
public void setMargin(MarginInfo value)
public float getPosX()
public void setPosX(float value)
public String getRefPageNumber()
Gets or sets a string value that indicates the page number of the paragraph which is a reference paragraph..
public void setRefPageNumber(String value)
public float getPosY()
Gets or sets a float value that indicates the y-coordinate of the paragraph beginning position.
public void setPosY(float value)
public float getWidth()
public void setWidth(float value)
public float getHeight()
public void setHeight(float value)
public int getPageNumber()
public void setPageNumber(int value)
public int getRealPageNumber()
public void setRealPageNumber(int value)
public Paragraph getNextParagraphInHeading()
Gets or sets a Paragraph
object that indicates the next paragraph in heading link.
public void setNextParagraphInHeading(Paragraph value)
public String getID()
Gets or sets a string that indicates the ID of the paragraph.
public void setID(String value)
public boolean isFirstParagraph()
Gets or sets a bool value that indicates whether the paragraph is the first paragraph of a page. If this property is set to true,Aspose.Pdf.Generator will start a new page for this paragraph.
public void isFirstParagraph(boolean value)
public boolean isFirstParagraphInColumn()
Gets or sets a bool value that indicates whether the paragraph be the first paragraph of a column.
public void isFirstParagraphInColumn(boolean value)
public boolean isKeptTogether()
Gets or sets a bool value that indicates whether all lines in the paragraph are to remain on the same page. Default is false. This property only affects paragraphs in section (but not in table).
public void isKeptTogether(boolean value)
public boolean isKeptWithNext()
Gets or sets a bool value that indicates whether current paragraph remains in the same page along with next paragraph. Default is false. This property only affects paragraphs in section (but ont in table) except FloatingBox, which position is set by manual.
public void isKeptWithNext(boolean value)
public boolean isDisabled()
Gets or sets a bool value that indicates whether this paragraph is disabled. The default value is false. If this property is set to true, this paragraph will not be rendered.
public void isDisabled(boolean value)
public boolean isInList()
Get or set a bool value that indicates whether this paragraph is used as a list item. The default value is false. If this property is set to true, this paragraph will appear in the list when the list is constructed.
public void isInList(boolean value)
public int getBookmarked()
Get or set a bool value that indicates whether this paragraph is used as a bookmark item.
public void setBookmarked(int value)
public boolean isOnOddPage()
Gets or sets a bool value that indicates whether this paragraph be shown in odd page only. This property used for duplex Printing. If you want to print a paragraph in a new odd page in duplex Printing,you can set "IsFirstParagraph = true" and "IsOnOddPage = true".
public void isOnOddPage(boolean value)
public float getLeft()
Gets or sets a float value that indicates the left position of the paragraph. The unit is point.
PositioningType
public void setLeft(float value)
public float getTop()
Gets or sets a float value that indicates the top position of the paragraph. The unit is point.
PositioningType
public void setTop(float value)
public int getPositioningType()
The positioning type for custom positioning. Default value is Auto (don not use custom positioning).
public void setPositioningType(int value)
public String getReferenceParagraphID()
Gets or sets a string that indicates the reference paragraph when using paragraph relative customer positioning.
public void setReferenceParagraphID(String value)
public boolean getNeedReprocess()
public void setNeedReprocess(boolean value)
public boolean isInHeaderFooter()
public void isInHeaderFooter(boolean value)
public float getReferencedParagraphWidth()
public void setReferencedParagraphWidth(float value)
public void copyTo(Paragraph par)
Copyright © 2016 Aspose. All Rights Reserved.