v24.12
Thêm Plugin mới: Chuyển PDF sang PNG
- Class PngConverter: Đại diện cho plugin
Documentize.PngConverter. Được sử dụng để chuyển đổi tài liệu PDF sang định dạng PNG. - Class PdfToPngOptions: Đại diện cho các tùy chọn chuyển PDF sang PNG cho plugin
Documentize.PngConverter.
Ví dụ sử dụng:
// create PngConverter
var plugin = new PngConverter();
// create PdfToPngOptions object to set instructions
var opt = new PdfToPngOptions();
// add input file path
opt.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// set output file path
opt.AddOutput(new DirectoryDataSource("path_to_results_directory"));
// perform the process
plugin.Process(opt);
Thêm Plugin mới: Chuyển PDF sang TIFF
- Class TiffConverter: Đại diện cho plugin
Documentize.TiffConverter. Được sử dụng để chuyển đổi tài liệu PDF sang định dạng TIFF. - Class PdfToTiffOptions: Đại diện cho các tùy chọn chuyển PDF sang TIFF cho plugin
Documentize.TiffConverter.
Ví dụ sử dụng:
// create TiffConverter
var plugin = new TiffConverter();
// create PdfToTiffOptions object to set instructions
var opt = new PdfToTiffOptions();
// add input file path
opt.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// set output file path
opt.AddOutput(new DirectoryDataSource("path_to_results_directory"));
// perform the process
plugin.Process(opt);
Thêm Plugin mới: Trình tạo Bảng PDF
- Class TableGenerator: Đại diện cho plugin
Documentize.TableGenerator. Được sử dụng để thêm bảng vào tài liệu PDF. - Class TableBuilder: Lớp đại diện cho bộ xây dựng bảng trên trang PDF.
- Class TableRowBuilder: Lớp đại diện cho bộ xây dựng hàng bảng.
- Class TableCellBuilder: Lớp đại diện cho bộ xây dựng ô bảng.
Ví dụ sử dụng:
// create TableGenerator
var plugin = new TableGenerator();
// create TableOptions object to set instructions
TableOptions opt = 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
opt.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// set output file path
opt.AddOutput(new FileDataSource("path_to_the_converted_file.pdf"));
// perform the process
plugin.Process(opt);
Đổi tên Class PdfDoc thành DocConverter
- Class DocConverter: Đại diện cho plugin
Documentize.DocConverter. Được sử dụng để chuyển đổi tài liệu PDF sang định dạng DOC/DOCX.
Ví dụ sử dụng:
// create DocConverter
var plugin = new DocConverter();
// create PdfToDocOptions object to set instructions
var opt = new PdfToDocOptions();
// add input file path
opt.AddInput(new FileDataSource(inputPath));
// set output file path
opt.AddOutput(new FileDataSource(outputPath));
// perform the process
plugin.Process(opt);