Class TableGenerator

Thông tin

Đại diện cho plugin Documentize.TableGenerator. Được sử dụng để thêm bảng vào tài liệu PDF.

Kế thừa

objectTableGenerator

Thành viên kế thừa

Ví dụ

Ví dụ minh họa cách thêm bảng vào tệp 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 FileData("path_to_input.pdf"));
// Set output file path
options.AddOutput(new FileData("path_to_output.pdf"));
// Perform the process
TableGenerator.Process(options);

Phương thức

Process(TableOptions)

Thêm bảng vào tài liệu PDF.

public static ResultContainer Process(TableOptions options)

Tham số

  • options TableOptions: Đối tượng tùy chọn chứa các hướng dẫn cho thao tác.

Kết quả trả về

ResultContainer : Đối tượng chứa kết quả của thao tác.

Ngoại lệ

ArgumentException

Nếu options chưa được thiết lập.

Không gian tên: Documentize Assembly: Documentize.dll

 Tiếng Việt