Nous sommes heureux d’annoncer la sortie de GroupDocs.Parser for .NET 26.7, disponible depuis juillet 2026.
Nouveautés de cette version
| Clé | Résumé | Catégorie |
|---|---|---|
| PARSERNET-2890 | Implémenter la capacité d’extraire les annotations des documents PDF | Amélioration |
| PARSERNET-2891 | Implémenter les packages NuGet pour .NET 6, .NET 8, .NET 10 | Amélioration |
Modifications de l’API publique
Implémenter la capacité d’extraire les annotations des documents PDF
La classe AnnotationItem a été ajoutée à l’espace de noms GroupDocs.Parser.Data.
La propriété System.String Value a été ajoutée à la classe GroupDocs.Parser.Data.AnnotationItem.
La propriété Boolean Annotations a été ajoutée à la classe GroupDocs.Parser.Options.Features.
La propriété Boolean IncludeAnnotations a été ajoutée à la classe GroupDocs.Parser.Options.TextOptions.
La méthode System.Collections.Generic.IEnumerable<GroupDocs.Parser.Data.AnnotationItem> GetAnnotations() a été ajoutée à la classe GroupDocs.Parser.Parser.
La méthode System.Collections.Generic.IEnumerable<GroupDocs.Parser.Data.AnnotationItem> GetAnnotations(Int32) a été ajoutée à la classe GroupDocs.Parser.Parser.
Implémenter les packages NuGet pour .NET 6, .NET 8, .NET 10
Modifications de l’API publique : aucune.
Exemple de code
Extraire les annotations avec le texte complet
using (Parser parser = new Parser("C:\\MyDocuments\\MyFile.pdf"))
{
TextOptions options = new TextOptions()
{
IncludeAnnotations = true
};
using (TextReader reader = parser.GetText(options))
{
string text = reader.ReadToEnd();
Console.WriteLine(text);
}
}
Extraire les annotations séparément
using (Parser parser = new Parser("C:\\MyDocuments\\MyFile.pdf"))
{
IEnumerable<AnnotationItem> annotations = parser.GetAnnotations();
foreach (AnnotationItem annotation in annotations)
{
Console.WriteLine(annotation.Value);
}
}
Comment obtenir la mise à jour
NuGet
- .NET Framework 4.6.2 package
- .NET Standard 2.1 package
- .NET 6 package
- .NET 8 package
- .NET 10 package
Installez le package routeur — il sélectionnera automatiquement le package approprié pour votre plateforme :