v26.2
Amélioration de la fonctionnalité Extraction des propriétés pour PDF Extractor
- Class Extractor : peut extraire de nouvelles métadonnées à partir de documents PDF.
- Class PdfProperties : propriétés ajoutées : FileName, Created, Modified, Application, PdfProducer.
Exemple d’utilisation :
L’exemple montre comment extraire les propriétés (FileName, Title, Author, Subject, Keywords, Created, Modified, Application, PDF Producer, Number of Pages) d’un fichier 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;Exemple d’utilisation :
L’exemple montre comment extraire les propriétés (Title, Author, Subject, Keywords, Created, Modified, Application, PDF Producer, Number of Pages) d’un flux 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;Amélioration de la fonctionnalité Extraction de texte pour PDF Extractor
- La manipulation de l’extraction de texte et des paramètres d’extraction est désormais plus simple : vous pouvez spécifier les données d’entrée et obtenir le résultat plus facilement qu’auparavant.
- Class ExtractTextOptions : implémente IHaveInput. Utilise une seule donnée d’entrée. Types de données autorisés : File et Stream.
- Method Extract(ExtractTextOptions options) : renvoie une chaîne contenant les résultats.
- Object ResultContainer : supprimé de ExtractTextOptions.
Exemple d’utilisation :
L’exemple montre comment extraire le contenu texte d’un fichier 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);Exemple d’utilisation :
L’exemple montre comment extraire le contenu texte d’un flux 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);Exemple d’utilisation :
L’exemple montre comment extraire le texte d’un document PDF avec 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);Exemple d’utilisation :
L’exemple montre comment extraire le texte d’un fichier PDF dans le style le plus concis possible.
// Perform the process and get the extracted text
var textExtracted = PdfExtractor.Extract(new ExtractTextOptions("path_to_your_pdf_file.pdf", TextFormattingMode.Pure));Bugs corrigés
- La conversion d’un fichier Jpeg2000 en PDF échoue
- Problème de concaténation de PDF
- Le redimensionnement d’une page PDF produit une sortie blanche
- PDF vers HTML : la couleur surlignée est visible mais le texte est manquant
- PDF vers HTML : sortie HTML incorrecte générée
- PDF vers HTML : texte vertical du côté gauche manquant
- PDF vers HTML : le texte de l’en-tête disparaît
- PDF vers HTML : le texte annoté transparent n’est pas visible
- PDF vers PNG : certains caractères chinois ne s’affichent pas