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
| Key | Summary | Category |
|---|---|---|
| PARSERNET-2890 | Triển khai khả năng trích xuất chú thích từ tài liệu PDF | Improvement |
| PARSERNET-2891 | Triển khai các gói NuGet cho .NET 6, .NET 8, .NET 10 | Improvement |
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 khai: Không có.
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
- .NET Framework 4.6.2 package
- .NET Standard 2.1 package
- .NET 6 package
- .NET 8 package
- .NET 10 package
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: