Class TableGenerator

Info

Represents Documentize.TableGenerator plugin. Used to add a table to a PDF document.

public sealed class TableGenerator

Inheritance

objectTableGenerator

Inherited Members

Examples

The example demonstrates how to add table to PDF file.

// Initialize the TableGenerator
var plugin = new TableGenerator();
// Configure table options
var options = 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
options.AddInput(new FileDataSource("path_to_input.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_output.pdf"));
// Perform the process
plugin.Process(options);

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

 English