Class TableGenerator

Informação

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

[Obsolete("Por favor, use a classe PdfManager. A classe será deletada em breve.")]
public static class TableGenerator

Herança

objectTableGenerator

Membros Herdados

Exemplos

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

// Configurar opções da tabela
var options = new TableOptions().InsertPageBefore(1)
   .AddTable()
        .AddRow()
            .AddCell().AddParagraph("Nome")
            .AddCell().AddParagraph("Idade")
        .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");
// Adicionar caminho do arquivo de entrada
options.AddInput(new FileDataSource("path_to_input.pdf"));
// Definir caminho do arquivo de saída
options.AddOutput(new FileDataSource("path_to_output.pdf"));
// Realizar o processo
TableGenerator.Process(options);

Métodos

Process(TableOptions)

Adicionar tabela ao documento PDF.

public static ResultContainer Process(TableOptions options)

Parâmetros

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

Retorna

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

Exceções

ArgumentException

Se as opções não forem definidas.

Namespace: Documentize Assembly: Documentize.dll

 Português