Class TableGenerator

Informação

Representa o plugin Documentize.TableGenerator. Usado para adicionar uma tabela a um documento PDF.

[Obsolete("The class will be deleted soon. Please use PdfManager class.")]
public static class TableGenerator

Inheritance

objectTableGenerator

Inherited Members

Examples

O exemplo demonstra como adicionar uma tabela a um arquivo PDF.

// Configura opções da tabela
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");
// Adiciona caminho do arquivo de entrada
options.AddInput(new FileData("path_to_input.pdf"));
// Define caminho do arquivo de saída
options.AddOutput(new FileData("path_to_output.pdf"));
// Executa o processo
TableGenerator.Process(options);

Methods

Process(TableOptions)

Adiciona tabela ao documento PDF.

public static ResultContainer Process(TableOptions options)

Parameters

  • options TableOptions: Um objeto de opções contendo instruções para a operação.

Returns

ResultContainer : Um objeto contendo o resultado da operação.

Exceptions

ArgumentException
Se as opções não estiverem definidas.

Namespace: Documentize Assembly: Documentize.dll

 Português