public final class Table extends Paragraph implements com.aspose.ms.System.ICloneable
Represents a table Paragraph
in a Pdf document.
[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); aspose.pdf.generator.Table table1 = new aspose.pdf.generator.Table(); sec1.getParagraphs().add(table1); table1.setColumnWidths ( "70 2cm"); Row row1 = table1.getRows().add(); Cell cell1Row1 = row1.getCells().add("ColumnsSpan = 2"); cell1Row1.setColumnsSpan ( 2); cell1Row1.setBorder ( new BorderInfo((int)BorderSide.All,0.5F)); Row row2 = table1.getRows().add(); Cell cell1Row2 = row2.getCells().add("cell1"); cell1Row2.setBorder ( new BorderInfo((int)BorderSide.All,0.5F)); Cell cell2Row2 = row2.getCells().add("cell2"); cell2Row2.setBorder ( new BorderInfo((int)BorderSide.All,0.5F,new aspose.pdf.generator.Color("Red"))); pdf1.save(...); [XML] <Pdf xmlns="Aspose.Pdf"> <Section> <Table ColumnWidths="70 2cm"> <Row> <Cell ColumnsSpan="2"> <Border> <All LineWidth="0.5"></All> </Border> <Text> <Segment>ColumnsSpan = 2</Segment> </Text> </Cell> </Row> <Row> <Cell> <Border> <All LineWidth="0.5"></All> </Border> <Text> <Segment>cell1</Segment> </Text> </Cell> <Cell> <Border> <All LineWidth="0.5" Color="Red"></All> </Border> <Text> <Segment>cell2</Segment> </Text> </Cell> </Row> </Table> </Section> </Pdf>
Modifier and Type | Class and Description |
---|---|
static class |
Table.RSItemType |
Modifier and Type | Field and Description |
---|---|
Color |
BackgroundColor
Gets or sets a
Aspose.Pdf.Generator.LegacyXmlModel.Color object that indicates the background color of the table. |
BorderInfo |
Border
Gets or sets a
BorderInfo object that indicates the table border info. |
Text |
BreakText
Gets or sets a
Aspose.Pdf.Generator.LegacyXmlModel.Text object that will appear in the end of the table if it is continued to the next page. |
int |
ColumnAdjustment
Gets or sets a
ColumnAdjustmentType that indicates how to determine the width of columns.Default is Customized which means the column width are specified by manual. |
String |
ColumnWidths
Gets or sets a string that contains the width of each columns in this table.
|
int |
CornerStyle
The border corner style.
|
BorderInfo |
DefaultCellBorder
Gets or sets a
BorderInfo object that indicates the default border style for all cells
in this table. |
MarginInfo |
DefaultCellPadding
Gets or sets a
MarginInfo object that indicates the default cell padding in the table. |
TextInfo |
DefaultCellTextInfo
Gets or sets a
TextInfo object that indicates the default cell text format info. |
String |
DefaultColumnWidth
Get or sets default column width in the table.
|
float |
FixedWidth
Gets or sets a float value that indicates the fixed width of the table.
|
int |
FromRSItemType
indicate that where of the report items in reporting service the current table is transfered from.
|
boolean |
IsBroken
Gets or sets a bool value that indicates whether the table is allowed to be broken or not when
crossing pages.
|
boolean |
IsEmptyRowAtBottomShown
Gets or sets a bool value that indicates if the empty row at the bottom of the table be shown
in the PDF.
|
boolean |
IsFirstRowRepeated
Gets or sets a bool value that indicates whether the first row is repeated when its table is broken.
|
boolean |
IsFitToPage
Gets or sets a bool value that indicates whether the table need to be placed on single page.
|
boolean |
IsFixedRowHeightContentClip
Gets or sets a value that indicates in case with fixed row height, do content will be truncated if it go out of margin
|
boolean |
IsNeedRepeating
Gets or sets a bool value that indicates whether the paragraph need to be repeated on next page.
|
boolean |
IsOriginalVerticalBrokenTable
Gets or sets a bool value that indicates whether the table is the original vertical broken table
|
boolean |
IsSingleHeaderShown
A bool value that indicates whether table with only a header(IsFirstRowRepeated=true and Rows.Count=1)
be shown.
|
boolean |
IsVerticalBroken
Gets or sets a bool value that indicates whether the table is broken vertically as the table
is printed out of the right page margin.If The sub-table can be place in the same page,it will be placed after the original table in the same page.
|
boolean |
IsVerticalBrokenInSamePage
Gets or sets a bool value that indicates whether the vertically broken table is in the same page.
|
boolean |
IsWordWrapped
Gets or sets a boolean value that indicates the alignment type of the cell.
|
int |
RepeatingRows
Gets or sets a int value that indicates how many rows from the first row will be repeated when
the table is broken across pages.
|
TextInfo |
RepeatingRowStyle
Text formatting style for table repeating rows
|
Rows |
Rows
Gets or sets a
Rows collection that indicates all rows in the table. |
String |
Title
Gets or sets a string value that indicates the title of the table.
|
boolean |
UseTOCasTargetList
Get or set a bool value that indicates whether the table will be referenced in TOC instead of special TableList
|
int |
VerticalAlignment |
_PositioningType, FixedHeight, ID, IsDisabled, IsFirstParagraph, IsFirstParagraphInColumn, IsInList, IsKeptTogether, IsKeptWithNext, IsOnOddPage, Left, Margin, ReferenceParagraphID, Top
Constructor and Description |
---|
Table()
Initializes a new instance of the
Table class. |
Table(Cell cell)
Initializes a new instance of the
Table class in the Cell . |
Table(HeaderFooter parentHeaderOrFooter)
Initializes a new instance of the
Table class in the HeaderFooter . |
Table(Section section)
Initializes a new instance of the
Table class in the Section . |
Modifier and Type | Method and Description |
---|---|
com.aspose.pdf.generator.legacyxmlmodel.ITableRow |
addRow() |
Object |
completeClone()
Clones a new
Table object. |
Object |
deepClone()
Clones a new
Table object. |
int |
getAlignment()
Gets or sets a
AlignmentType that indicates the paragraph alignment type. |
int |
getColumnCount_Rename_Namesake() |
int |
getColumnCount()
Gets or sets an int value that indicates the total column number.
|
com.aspose.pdf.generator.legacyxmlmodel.ITableRow |
getRow(int index) |
int |
getRowsCount() |
boolean |
isRowBroken()
Gets or sets a bool value that indicates whether the row can be broken or not when its table
is broken.
|
void |
setAlignment(int value) |
void |
setColumnCount(int value) |
void |
setColumnTextInfo(int columnNumber,
TextInfo textInfo)
Sets the text format info of specified column.
|
void |
setFontSizeForTextualChildren(float newFontSize) |
void |
setRowBroken(boolean value) |
void |
setTextNameForTextualChildren(String newFontName) |
BaseParagraph |
toNewParagraph() |
copyTo, getBookmarked, setBookmarked
load
public boolean IsFitToPage
Gets or sets a bool value that indicates whether the table need to be placed on single page. Default value is false.The attribute is only valid when the table is the first paragraph on a page;
public int FromRSItemType
indicate that where of the report items in reporting service the current table is transfered from.
public boolean IsNeedRepeating
Gets or sets a bool value that indicates whether the paragraph need to be repeated on next page. Default value is false.The attribute is only valid when the paragraph itself and the object its ReferenceParagraphID referred to both are included in RepeatingRows.
public String ColumnWidths
Gets or sets a string that contains the width of each columns in this table. The value of each column should be separated by blank.The default unit is point, but cm,inch and percentage of available width are also supported.For example,"120 2.5cm 1.5inch", or "60% 40%", The max column number is 1024,
Cell
object needs not set.
public boolean IsBroken
Gets or sets a bool value that indicates whether the table is allowed to be broken or not when crossing pages.
public boolean IsVerticalBroken
Gets or sets a bool value that indicates whether the table is broken vertically as the table is printed out of the right page margin.If The sub-table can be place in the same page,it will be placed after the original table in the same page. If The sub-table can't be place in the same page,it will be placed after the original table in the next page. The default value is false.
public boolean IsOriginalVerticalBrokenTable
Gets or sets a bool value that indicates whether the table is the original vertical broken table
public boolean IsVerticalBrokenInSamePage
Gets or sets a bool value that indicates whether the vertically broken table is in the same page.
public boolean IsFirstRowRepeated
Gets or sets a bool value that indicates whether the first row is repeated when its table is broken.
public int RepeatingRows
Gets or sets a int value that indicates how many rows from the first row will be repeated when the table is broken across pages.
public boolean UseTOCasTargetList
Get or set a bool value that indicates whether the table will be referenced in TOC instead of special TableList
public boolean IsFixedRowHeightContentClip
Gets or sets a value that indicates in case with fixed row height, do content will be truncated if it go out of margin
public TextInfo RepeatingRowStyle
Text formatting style for table repeating rows
public int CornerStyle
The border corner style.
public BorderInfo Border
Gets or sets a BorderInfo
object that indicates the table border info.
public String Title
Gets or sets a string value that indicates the title of the table.
public Rows Rows
Gets or sets a Rows
collection that indicates all rows in the table.
public float FixedWidth
Gets or sets a float value that indicates the fixed width of the table.
<BLOCKQUOTE class="dtBlock">
<Font color="red">NOTE: This member is now obsolete.</Font></BLOCKQUOTE>
<BLOCKQUOTE class="dtBlock">
You should use {@code ColumnWidths} to set the column width of the table.
It will be removed 12 months later since release 3.0.0.0 in April 2006. Aspose apologizes for any inconvenience you may have experienced.</BLOCKQUOTE>
public int ColumnAdjustment
Gets or sets a ColumnAdjustmentType
that indicates how to determine the width of columns.Default is Customized which means the column width are specified by manual.
public BorderInfo DefaultCellBorder
Gets or sets a BorderInfo
object that indicates the default border style for all cells
in this table.
public TextInfo DefaultCellTextInfo
Gets or sets a TextInfo
object that indicates the default cell text format info.
public int VerticalAlignment
public MarginInfo DefaultCellPadding
Gets or sets a MarginInfo
object that indicates the default cell padding in the table.
public String DefaultColumnWidth
Get or sets default column width in the table. The default unit is point, but cm and inch are also supported. For example,FitWidth="2cm" or FitWidth="2inch".
public boolean IsSingleHeaderShown
A bool value that indicates whether table with only a header(IsFirstRowRepeated=true and Rows.Count=1) be shown. The default value is true.
public Color BackgroundColor
Gets or sets a Aspose.Pdf.Generator.LegacyXmlModel.Color
object that indicates the background color of the table.
public Text BreakText
Gets or sets a Aspose.Pdf.Generator.LegacyXmlModel.Text
object that will appear in the end of the table if it is continued to the next page.
public boolean IsEmptyRowAtBottomShown
Gets or sets a bool value that indicates if the empty row at the bottom of the table be shown in the PDF. When a table is larger and can't be display in one page, the table will be splited into more tables. Sometimes the broken table has a empty row at the bottom. This property is used to control the displaying of the empty row. The default value is false.
public boolean IsWordWrapped
Gets or sets a boolean value that indicates the alignment type of the cell.
public Table()
Initializes a new instance of the Table
class.
public Table(Section section)
Initializes a new instance of the Table
class in the Section
.
section
- The section object where the table is in.public Table(Cell cell)
Initializes a new instance of the Table
class in the Cell
.
cell
- The cell object where the table is in.public Table(HeaderFooter parentHeaderOrFooter)
Initializes a new instance of the Table
class in the HeaderFooter
.
parentHeaderOrFooter
- The header or footer object where the table is in.public boolean isRowBroken()
Gets or sets a bool value that indicates whether the row can be broken or not when its table is broken. Default value is true.
public void setRowBroken(boolean value)
public int getColumnCount()
Gets or sets an int value that indicates the total column number.
public void setColumnCount(int value)
public int getAlignment()
Gets or sets a AlignmentType
that indicates the paragraph alignment type.
public void setAlignment(int value)
public Object deepClone()
Clones a new Table
object. Table properties are cloned but rows in table is not cloned.
deepClone
in interface com.aspose.ms.System.ICloneable
public Object completeClone()
Clones a new Table
object. All members in the table are cloned.
completeClone
in class Paragraph
Table
object.public void setColumnTextInfo(int columnNumber, TextInfo textInfo)
Sets the text format info of specified column.
columnNumber
- The number of the column to be set.textInfo
- The text info object to set.public void setTextNameForTextualChildren(String newFontName)
public void setFontSizeForTextualChildren(float newFontSize)
public BaseParagraph toNewParagraph()
public int getColumnCount_Rename_Namesake()
public int getRowsCount()
public com.aspose.pdf.generator.legacyxmlmodel.ITableRow addRow()
public com.aspose.pdf.generator.legacyxmlmodel.ITableRow getRow(int index)
Copyright © 2014 Aspose. All Rights Reserved.