v26.2
Cải tiến tính năng Trích xuất Thuộc tính cho PDF Extractor
- Class Extractor: có thể trích xuất siêu dữ liệu mới từ tài liệu PDF.
- Class PdfProperties: đã thêm các thuộc tính: FileName, Created, Modified, Application, PdfProducer.
Ví dụ sử dụng:
Ví dụ minh họa cách Trích xuất Thuộc tính (FileName, Title, Author, Subject, Keywords, Created, Modified, Application, PDF Producer, Number of Pages) từ tệp PDF.
// Create ExtractPropertiesOptions object to set input file
var options = new ExtractPropertiesOptions("path_to_your_pdf_file.pdf");
// Perform the process and get Properties
var pdfProperties = PdfExtractor.Extract(options);
var filename = pdfProperties.FileName;
var title = pdfProperties.Title;
var author = pdfProperties.Author;
var subject = pdfProperties.Subject;
var keywords = pdfProperties.Keywords;
var created = pdfProperties.Created;
var modified = pdfProperties.Modified;
var application = pdfProperties.Application;
var pdfProducer = pdfProperties.PdfProducer;
var numberOfPages = pdfProperties.NumberOfPages;Ví dụ sử dụng:
Ví dụ minh họa cách Trích xuất Thuộc tính (Title, Author, Subject, Keywords, Created, Modified, Application, PDF Producer, Number of Pages) từ luồng PDF.
// Create ExtractPropertiesOptions object to set input stream
var stream = File.OpenRead("path_to_your_pdf_file.pdf");
var options = new ExtractPropertiesOptions(stream);
// Perform the process and get Properties
var pdfProperties = PdfExtractor.Extract(options);
var title = pdfProperties.Title;
var author = pdfProperties.Author;
var subject = pdfProperties.Subject;
var keywords = pdfProperties.Keywords;
var created = pdfProperties.Created;
var modified = pdfProperties.Modified;
var application = pdfProperties.Application;
var pdfProducer = pdfProperties.PdfProducer;
var numberOfPages = pdfProperties.NumberOfPages;Cải tiến tính năng Trích xuất Văn bản cho PDF Extractor
- Việc làm việc với việc trích xuất văn bản và các tham số trích xuất giờ trở nên dễ dàng hơn: bạn có thể chỉ định dữ liệu đầu vào và nhận kết quả dễ dàng hơn trước.
- Class ExtractTextOptions: triển khai IHaveInput. Chỉ sử dụng 1 dữ liệu đầu vào. Các DataTypes được phép: File và Stream.
- Method Extract(ExtractTextOptions options): trả về chuỗi kết quả.
- Object ResultContainer: đã được loại bỏ khỏi ExtractTextOptions.
Ví dụ sử dụng:
Ví dụ minh họa cách Trích xuất nội dung Văn bản từ tệp PDF.
// Create ExtractTextOptions object to set input file path
var options = new ExtractTextOptions("path_to_your_pdf_file.pdf");
// Perform the process and get the extracted text
var textExtracted = PdfExtractor.Extract(options);Ví dụ sử dụng:
Ví dụ minh họa cách Trích xuất nội dung Văn bản từ luồng PDF.
// Create ExtractTextOptions object to set input stream
var stream = File.OpenRead("path_to_your_pdf_file.pdf");
var options = new ExtractTextOptions(stream);
// Perform the process and get the extracted text
var textExtracted = PdfExtractor.Extract(options);Ví dụ sử dụng:
Ví dụ minh họa cách Trích xuất nội dung Văn bản của tài liệu PDF với TextFormattingMode.
// Create ExtractTextOptions object to set input file path and TextFormattingMode
var options = new ExtractTextOptions("path_to_your_pdf_file.pdf", TextFormattingMode.Pure);
// Perform the process and get the extracted text
var textExtracted = PdfExtractor.Extract(options);Ví dụ sử dụng:
Ví dụ minh họa cách Trích xuất Văn bản từ tệp PDF theo phong cách ngắn gọn nhất có thể.
// Perform the process and get the extracted text
var textExtracted = PdfExtractor.Extract(new ExtractTextOptions("path_to_your_pdf_file.pdf", TextFormattingMode.Pure));Sửa lỗi
- Lỗi chuyển đổi tập tin Jpeg2000 sang PDF
- Vấn đề ghép nối PDF
- Thay đổi kích thước trang PDF gây ra kết quả trống
- PDF sang HTML: Màu tô sáng hiển thị nhưng văn bản thiếu
- PDF sang HTML: Tạo ra HTML không đúng
- PDF sang HTML: Văn bản dọc bên trái bị thiếu
- PDF sang HTML: Văn bản trong tiêu đề biến mất
- PDF sang HTML: Văn bản chú thích trong suốt không hiển thị
- PDF sang PNG: Một số ký tự Trung Quốc không hiển thị đúng