We’re pleased to announce the release of GroupDocs.Parser for .NET 26.7, available as of July 2026.

What’s new in this release

摘要 類別
PARSERNET-2890 實作從 PDF 文件提取註釋的功能 改進
PARSERNET-2891 實作 .NET 6、.NET 8、.NET 10 的 NuGet 套件 改進

Public API changes

實作從 PDF 文件提取註釋的功能

已在 GroupDocs.Parser.Data 命名空間中新增類別 AnnotationItem
已在 GroupDocs.Parser.Data.AnnotationItem 類別中新增屬性 System.String Value

已在 GroupDocs.Parser.Options.Features 類別中新增屬性 Boolean Annotations
已在 GroupDocs.Parser.Options.TextOptions 類別中新增屬性 Boolean IncludeAnnotations

已在 GroupDocs.Parser.Parser 類別中新增方法 System.Collections.Generic.IEnumerable<GroupDocs.Parser.Data.AnnotationItem> GetAnnotations()
已在 GroupDocs.Parser.Parser 類別中新增方法 System.Collections.Generic.IEnumerable<GroupDocs.Parser.Data.AnnotationItem> GetAnnotations(Int32)

實作 .NET 6、.NET 8、.NET 10 的 NuGet 套件

公共 API 變更:無。

Code example

Extract annotations together with 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);
    }
}

Extract annotations separately

using (Parser parser = new Parser("C:\\MyDocuments\\MyFile.pdf"))
{
    IEnumerable<AnnotationItem> annotations = parser.GetAnnotations();
    foreach (AnnotationItem annotation in annotations)
    {
        Console.WriteLine(annotation.Value);
    }
}

How to get the update

NuGet

安裝路由套件 — 它會自動為您的平台選擇相應的套件: