GroupDocs.Parser for .NET 26.7 Release Notes
Full List of Issues Covering all Changes in this Release
| Key | Summary | Category |
|---|---|---|
| PARSERNET-2890 | Implement the ability to extract annotations from PDF documents | Improvement |
| PARSERNET-2891 | Implement NuGet packages for .NET 6, .NET 8, .NET 10 | Improvement |
Public API and Backward Incompatible Changes
Implement the ability to extract annotations from PDF documents
Description
This improvement allows you to extract annotations from PDF documents either simultaneously with extracting the entire text of the document, or separately.
Public API changes
Class AnnotationItem has been added to GroupDocs.Parser.Data namespace.
Property System.String Value has been added to GroupDocs.Parser.Data.AnnotationItem class.
Property Boolean Annotations has been added to GroupDocs.Parser.Options.Features class.
Property Boolean IncludeAnnotations has been added to GroupDocs.Parser.Options.TextOptions class.
Method System.Collections.Generic.IEnumerable<GroupDocs.Parser.Data.AnnotationItem> GetAnnotations() has been added to GroupDocs.Parser.Parser class.
Method System.Collections.Generic.IEnumerable<GroupDocs.Parser.Data.AnnotationItem> GetAnnotations(Int32) has been added to GroupDocs.Parser.Parser class.
Usage
The following example demonstrates how to extract annotations from a PDF document simultaneously with extracting the full text:
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);
}
}
The following example demonstrates how to extract annotations from a PDF document separately:
using (Parser parser = new Parser("C:\\MyDocuments\\MyFile.pdf"))
{
IEnumerable<AnnotationItem> annotations = parser.GetAnnotations();
foreach (AnnotationItem annotation in annotations)
{
Console.WriteLine(annotation.Value);
}
}
Implement NuGet packages for .NET 6, .NET 8, .NET 10
This improvement adds NuGet packages for three platforms: .NET 6, .NET 8, and .NET 10.
Therefore, packages for five platforms are now available:
https://www.nuget.org/packages/GroupDocs.Parser.Net462
https://www.nuget.org/packages/GroupDocs.Parser.NetStandard21
https://www.nuget.org/packages/GroupDocs.Parser.Net60
https://www.nuget.org/packages/GroupDocs.Parser.Net80
https://www.nuget.org/packages/GroupDocs.Parser.Net100
And there is no need to choose which one to install.
Install the router package — it will automatically select the appropriate package for your platform:
https://www.nuget.org/packages/GroupDocs.Parser
Public API changes
None.
Usage
None.