Bảng TableGenerator

Thông tin

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

public sealed class TableGenerator

Kế thừa

objectTableGenerator

Các thành viên kế thừa

Ví dụ

Ví dụ này minh họa cách thêm bảng vào tệp PDF.

// tạo TableGenerator
var plugin = new TableGenerator();
// tạo đối tượng TableOptions để thiết lập hướng dẫn
TableOptions opt = new TableOptions().InsertPageBefore(1)
   .AddTable()
        .AddRow()
            .AddCell().AddParagraph("Tên")
            .AddCell().AddParagraph("Tuổi")
        .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");
// thêm đường dẫn tệp đầu vào
opt.AddInput(new FileDataSource(inputPath1));
// thiết lập đường dẫn tệp đầu ra
opt.AddOutput(new FileDataSource(outputPath));
// thực hiện quá trình
plugin.Process(opt);

Các hàm khởi tạo

TableGenerator()

public TableGenerator()

Các phương thức

Process(TableOptions)

Bắt đầu quá trình Documentize.TableGenerator với các tham số được chỉ định.

public ResultContainer Process(TableOptions options)

Tham số

  • options TableOptions: Một đối tượng tùy chọn chứa các hướng dẫn cho Documentize.TableGenerator.

Trả về

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

Namespace: Documentize Assembly: Documentize.dll

 Tiếng Việt