v26.2
Fitur yang Ditingkatkan Ekstrak Properti untuk PDF Extractor
- Class Extractor: dapat mengekstrak metadata baru dari dokumen PDF.
- Class PdfProperties: menambahkan properti: FileName, Created, Modified, Application, PdfProducer.
Contoh Penggunaan:
Contoh ini menunjukkan cara Mengekstrak Properti (FileName, Title, Author, Subject, Keywords, Created, Modified, Application, PDF Producer, Number of Pages) dari file 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;Contoh Penggunaan:
Contoh ini menunjukkan cara Mengekstrak Properti (Title, Author, Subject, Keywords, Created, Modified, Application, PDF Producer, Number of Pages) dari aliran 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;Fitur yang Ditingkatkan Ekstrak Teks untuk PDF Extractor
- Bekerja dengan ekstraksi teks dan parameter ekstraksi kini lebih mudah: Anda dapat menentukan data input dan mendapatkan hasil lebih mudah daripada sebelumnya.
- Class ExtractTextOptions: mengimplementasikan IHaveInput. Hanya gunakan 1 data input. Tipe Data yang Diizinkan: File dan Stream.
- Method Extract(ExtractTextOptions options): mengembalikan string dengan hasil.
- Object ResultContainer: dihapus dari ExtractTextOptions.
Contoh Penggunaan:
Contoh ini menunjukkan cara Mengekstrak konten Teks dari file 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);Contoh Penggunaan:
Contoh ini menunjukkan cara Mengekstrak konten Teks dari aliran 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);Contoh Penggunaan:
Contoh ini menunjukkan cara Mengekstrak konten Teks dari dokumen PDF dengan 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);Contoh Penggunaan:
Contoh ini menunjukkan cara Mengekstrak Teks dari file PDF dengan gaya paling singkat.
// Perform the process and get the extracted text
var textExtracted = PdfExtractor.Extract(new ExtractTextOptions("path_to_your_pdf_file.pdf", TextFormattingMode.Pure));Bug yang Diperbaiki
- Konversi file Jpeg2000 ke PDF gagal
- Masalah penggabungan PDF
- Pengubahan ukuran halaman PDF menghasilkan output kosong
- PDF ke HTML: Warna sorotan terlihat tetapi teks tidak ada
- PDF ke HTML: Output HTML yang dihasilkan tidak tepat
- PDF ke HTML: Teks vertikal di sisi kiri tidak ada
- PDF ke HTML: Teks di header menghilang
- PDF ke HTML: Teks anotasi transparan tidak terlihat
- PDF ke PNG: Beberapa karakter Cina gagal dirender