Class 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.
[Obsolete("The class will be deleted soon. Please use PdfManager class.")]
public static class TableGeneratorKế thừa
Thành viên kế thừa
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
Ví dụ
The example demonstrates how to add table to PDF file.
// Cấu hình tùy chọn bảng
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");
// Thêm đường dẫn file đầu vào
options.AddInput(new FileData("path_to_input.pdf"));
// Đặt đường dẫn file đầu ra
options.AddOutput(new FileData("path_to_output.pdf"));
// Thực hiện quá trình
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ố
optionsTableOptions: Một đối tượng tùy chọn chứa các hướng dẫn cho thao tác.
Giá trị trả về
ResultContainer : Một đối tượng chứa kết quả của thao tác.
Ngoại lệ
ArgumentException
Nếu tùy chọn không được đặt.
Không gian tên: Documentize
Tệp lắp ráp: Documentize.dll