Chúng tôi vui mừng thông báo việc phát hành GroupDocs.Parser for .NET 26.7, có sẵn từ tháng 7 2026.

What’s new in this release

Khóa Tóm tắt Thể loại
PARSERNET-2890 Triển khai khả năng trích xuất chú thích từ tài liệu PDF Cải tiến
PARSERNET-2891 Triển khai các gói NuGet cho .NET 6, .NET 8, .NET 10 Cải tiến

Public API changes

Triển khai khả năng trích xuất chú thích từ tài liệu PDF

Lớp AnnotationItem đã được thêm vào không gian tên GroupDocs.Parser.Data.
Thuộc tính System.String Value đã được thêm vào lớp GroupDocs.Parser.Data.AnnotationItem.

Thuộc tính Boolean Annotations đã được thêm vào lớp GroupDocs.Parser.Options.Features.
Thuộc tính Boolean IncludeAnnotations đã được thêm vào lớp GroupDocs.Parser.Options.TextOptions.

Phương thức System.Collections.Generic.IEnumerable<GroupDocs.Parser.Data.AnnotationItem> GetAnnotations() đã được thêm vào lớp GroupDocs.Parser.Parser.
Phương thức System.Collections.Generic.IEnumerable<GroupDocs.Parser.Data.AnnotationItem> GetAnnotations(Int32) đã được thêm vào lớp GroupDocs.Parser.Parser.

Triển khai các gói NuGet cho .NET 6, .NET 8, .NET 10

Thay đổi API công cộng: Không có.

Code example

Trích xuất chú thích cùng với toàn bộ văn bản

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);
    }
}

Trích xuất chú thích riêng biệt

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

Cách nhận bản cập nhật

NuGet

Cài đặt gói router — nó sẽ tự động chọn gói phù hợp cho nền tảng của bạn: