InspectionPackage
PdfRootPackage.InspectionPackage property
获取包含文档检查结果的元数据包。 该包包含有关文档部分的信息,在某些情况下可以将其视为元数据。
public PdfInspectionPackage InspectionPackage { get; }
适当的价值
包含文档检查结果的元数据包。
评论
了解更多
例子
此示例演示如何检查 PDF 文档。
using (Metadata metadata = new Metadata(Constants.SignedPdf))
{
var root = metadata.GetRootPackage<PdfRootPackage>();
if (root.InspectionPackage.Annotations != null)
{
foreach (var annotation in root.InspectionPackage.Annotations)
{
Console.WriteLine(annotation.Name);
Console.WriteLine(annotation.Text);
Console.WriteLine(annotation.PageNumber);
}
}
if (root.InspectionPackage.Attachments != null)
{
foreach (var attachment in root.InspectionPackage.Attachments)
{
Console.WriteLine(attachment.Name);
Console.WriteLine(attachment.MimeType);
Console.WriteLine(attachment.Description);
}
}
if (root.InspectionPackage.Bookmarks != null)
{
foreach (var bookmark in root.InspectionPackage.Bookmarks)
{
Console.WriteLine(bookmark.Title);
}
}
if (root.InspectionPackage.DigitalSignatures != null)
{
foreach (var signature in root.InspectionPackage.DigitalSignatures)
{
Console.WriteLine(signature.CertificateSubject);
Console.WriteLine(signature.Comments);
Console.WriteLine(signature.SignTime);
// ...
}
}
if (root.InspectionPackage.Fields != null)
{
foreach (var field in root.InspectionPackage.Fields)
{
Console.WriteLine(field.Name);
Console.WriteLine(field.Value);
// ...
}
}
}
也可以看看
- class PdfInspectionPackage
- class PdfRootPackage
- 命名空间 GroupDocs.Metadata.Formats.Document
- 部件 GroupDocs.Metadata