Class TableGenerator
Info
Represents Documentize.TableGenerator plugin. Used to add a table to a PDF document.
public sealed class TableGenerator
Inheritance
Inherited Members
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
Examples
The example demonstrates how to add table to PDF file.
// create TableGenerator
var plugin = new TableGenerator();
// create TableOptions object to set instructions
TableOptions opt = new TableOptions().InsertPageBefore(1)
.AddTable()
.AddRow()
.AddCell().AddParagraph("Name")
.AddCell().AddParagraph("Age")
.AddRow()
.AddCell().AddParagraph("Bob")
.AddCell().AddParagraph("12")
.AddRow()
.AddCell().AddParagraph("Sam")
.AddCell().AddParagraph("20")
.AddRow()
.AddCell().AddParagraph("Sandy")
.AddCell().AddParagraph("26")
.AddRow()
.AddCell().AddParagraph("Tom")
.AddCell().AddParagraph("12")
.AddRow()
.AddCell().AddParagraph("Jim")
.AddCell().AddParagraph("27");
// add input file path
opt.AddInput(new FileDataSource(inputPath1));
// set output file path
opt.AddOutput(new FileDataSource(outputPath));
// perform the process
plugin.Process(opt);
Constructors
TableGenerator()
public TableGenerator()
Methods
Process(TableOptions)
Starts the Documentize.TableGenerator processing with the specified parameters.
public ResultContainer Process(TableOptions options)
Parameters
options
TableOptions: An options object containg instructions for the Documentize.TableGenerator.
Returns
ResultContainer : An ResultContainer object containg the result of the operation.
Namespace: Documentize Assembly: Documentize.dll