Class TableGenerator

Информация

Представляет плагин Documentize.TableGenerator. Используется для добавления таблицы в PDF-документ.

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

Наследование

objectTableGenerator

Унаследованные члены

Примеры

Этот пример демонстрирует, как добавить таблицу в PDF-файл.

// 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
TableGenerator.Process(options);

Методы

Process(TableOptions)

Добавляет таблицу в PDF-документ.

public static ResultContainer Process(TableOptions options)

Параметры

  • options TableOptions: Объект параметров, содержащий инструкции для операции.

Возвращает

ResultContainer : Объект, содержащий результат операции.

Исключения

ArgumentException

Если параметры не заданы.

Namespace: Documentize Assembly: Documentize.dll

17 нояб. 2025 г.
 Русский