public class TemplateTable extends TemplateItem
There are two ways to define a table:
TemplateTableLayout class. In this case the table is defined by its position on the page:
rectangular area, columns and rows separators.TemplateTableParameters class. In this case the table is detected automatically
by algorithms with set parameters. See TemplateTableParameters class for more information.| Constructor and Description |
|---|
TemplateTable(TemplateTableLayout layout,
String name,
Integer pageIndex)
Initializes a new instance of the
TemplateTable class with the UPPER CASE name. |
TemplateTable(TemplateTableLayout layout,
String name,
Integer pageIndex,
boolean useUpperCaseName)
Initializes a new instance of the
TemplateTable class. |
TemplateTable(TemplateTableLayout layout,
String name,
Integer pageIndex,
Double pageWidth)
Initializes a new instance of the
TemplateTable class with the UPPER CASE name. |
TemplateTable(TemplateTableLayout layout,
String name,
Integer pageIndex,
Double pageWidth,
boolean useUpperCaseName)
Initializes a new instance of the
TemplateTable class. |
TemplateTable(TemplateTableParameters parameters,
String name,
Integer pageIndex)
Initializes a new instance of the
TemplateTable class with the UPPER CASE name. |
TemplateTable(TemplateTableParameters parameters,
String name,
Integer pageIndex,
boolean useUpperCaseName)
Initializes a new instance of the
TemplateTable class. |
TemplateTable(TemplateTableParameters parameters,
String name,
Integer pageIndex,
Double pageWidth)
Initializes a new instance of the
TemplateTable class. |
TemplateTable(TemplateTableParameters parameters,
String name,
Integer pageIndex,
Double pageWidth,
boolean useUpperCaseName)
Initializes a new instance of the
TemplateTable class. |
| Modifier and Type | Method and Description |
|---|---|
TemplateTableLayout |
getLayout()
Gets the table layout.
|
TemplateTableParameters |
getParameters()
Gets the parameters to detect the table in the automatic mode.
|
TemplateItem |
scale(double factor)
Creates a copy of the current item with all coordinates scaled by the given factor.
|
getName, getPageIndex, getPageWidth, getUseUpperCaseNamepublic TemplateTable(TemplateTableLayout layout, String name, Integer pageIndex)
TemplateTable class with the UPPER CASE name.
Template table is set by table layout if the table can't be detected automatically:
TemplateTableLayout layout = new TemplateTableLayout(
java.util.Arrays.asList(new Double[] { 50.0, 95.0, 275.0 }),
java.util.Arrays.asList(new Double[] { 325.0, 340.0, 365.0 }));
TemplateTable table = new TemplateTable(layout, "Details", null);
// Create a document template
Template template = new Template(java.util.Arrays.asList(new TemplateItem[] { table }));layout - The table layout.name - The table name.pageIndex - The index of the page where the template table is located; null if the template table is located on any page.public TemplateTable(TemplateTableLayout layout, String name, Integer pageIndex, Double pageWidth)
TemplateTable class with the UPPER CASE name.layout - The table layout.name - The table name.pageIndex - The index of the page where the template table is located; null if the template table is located on any page.pageWidth - The width of the page that was used to create the template item.public TemplateTable(TemplateTableLayout layout, String name, Integer pageIndex, boolean useUpperCaseName)
TemplateTable class.layout - The table layout.name - The table name.pageIndex - The index of the page where the template table is located; null if the template table is located on any page.useUpperCaseName - The value that indicates whether a name is converted to UPPER CASE.public TemplateTable(TemplateTableLayout layout, String name, Integer pageIndex, Double pageWidth, boolean useUpperCaseName)
TemplateTable class.layout - The table layout.name - The table name.pageIndex - The index of the page where the template table is located; null if the template table is located on any page.pageWidth - The width of the page that was used to create the template item.useUpperCaseName - The value that indicates whether a name is converted to UPPER CASE.public TemplateTable(TemplateTableParameters parameters, String name, Integer pageIndex)
TemplateTable class with the UPPER CASE name.
If a template table is set by detector parameters, the table is detected automatically:
TemplateTableParameters parameters = new TemplateTableParameters(
new Rectangle(new Point(175, 350), new Size(400, 200)),
java.util.Arrays.asList(new Double[] { 185.0, 370.0, 425.0, 485.0, 545.0 }));
TemplateTable table = new TemplateTable(parameters, "Details", 0);
// Create a document template
Template template = new Template(java.util.Arrays.asList(new TemplateItem[] { table }));
parameters - The parameters to detect the table in the automatic mode.name - The table name.pageIndex - The index of the page where the template table is located; null if the template table is located on any page.public TemplateTable(TemplateTableParameters parameters, String name, Integer pageIndex, Double pageWidth)
TemplateTable class.parameters - The parameters to detect the table in the automatic mode.name - The table name.pageIndex - The index of the page where the template table is located; null if the template table is located on any page.pageWidth - The width of the page that was used to create the template item.public TemplateTable(TemplateTableParameters parameters, String name, Integer pageIndex, boolean useUpperCaseName)
TemplateTable class.parameters - The parameters to detect the table in the automatic mode.name - The table name.pageIndex - The index of the page where the template table is located; null if the template table is located on any page.useUpperCaseName - The value that indicates whether a name is converted to UPPER CASE.public TemplateTable(TemplateTableParameters parameters, String name, Integer pageIndex, Double pageWidth, boolean useUpperCaseName)
TemplateTable class.parameters - The parameters to detect the table in the automatic mode.name - The table name.pageIndex - The index of the page where the template table is located; null if the template table is located on any page.pageWidth - The width of the page that was used to create the template item.useUpperCaseName - The value that indicates whether a name is converted to UPPER CASE.public TemplateTableLayout getLayout()
TemplateTableLayout class that represents the table layout; null if it isn't set.public TemplateTableParameters getParameters()
TemplateTableParameters class that represents the parameters to detect the table in the automatic mode; null if it isn't set.public TemplateItem scale(double factor)
TemplateItemscale in class TemplateItemfactor - The scaling factor.TemplateItem with scaled coordinates.Copyright © 2026. All rights reserved.