管理 PDF 中的元数据可见性
This article was translated from English: Does it need improvement?
TranslatedView the article in English
元数据类别中可见什么内容?
任何能够打开PDF的人都可以看到元数据。 这些详细信息包括以下项目:
// Assign metadata properties to a PDF document
Pdf.MetaData.Author = "John Doe"; // The author of the document
Pdf.MetaData.Keywords = "Key, Word"; // Keywords associated with the document
Pdf.MetaData.CreationDate = DateTime.Today; // The date the document was created
Pdf.MetaData.ModifiedDate = DateTime.Now; // The date and time the document was last modified
Pdf.MetaData.CustomProperties.Add("Test", "val"); // Custom properties for additional metadata
Pdf.MetaData.Producer = "test"; // The software used to produce the document
Pdf.MetaData.Subject = "test metadata"; // The subject of the document
Pdf.MetaData.Title = "test"; // The title of the document
Pdf.MetaData.Creator = "test"; // The original creator of the document
// Security settings for the PDF
Pdf.SecuritySettings.UserPassword = "ironuser"; // Password to open and view the PDF
Pdf.SecuritySettings.OwnerPassword = "ironowner"; // Password providing full permissions, including editing// Assign metadata properties to a PDF document
Pdf.MetaData.Author = "John Doe"; // The author of the document
Pdf.MetaData.Keywords = "Key, Word"; // Keywords associated with the document
Pdf.MetaData.CreationDate = DateTime.Today; // The date the document was created
Pdf.MetaData.ModifiedDate = DateTime.Now; // The date and time the document was last modified
Pdf.MetaData.CustomProperties.Add("Test", "val"); // Custom properties for additional metadata
Pdf.MetaData.Producer = "test"; // The software used to produce the document
Pdf.MetaData.Subject = "test metadata"; // The subject of the document
Pdf.MetaData.Title = "test"; // The title of the document
Pdf.MetaData.Creator = "test"; // The original creator of the document
// Security settings for the PDF
Pdf.SecuritySettings.UserPassword = "ironuser"; // Password to open and view the PDF
Pdf.SecuritySettings.OwnerPassword = "ironowner"; // Password providing full permissions, including editing$vbLabelText $csharpLabel
- 当仅设置了所有者密码时,用户可以完全访问PDF元数据,包括查看和修改所有文档属性的能力。
- 当仅设置了用户密码时,只有持有密码的人才能打开PDF。 用户可以查看元数据属性,但修改元数据受到限制。
请注意Adobe Acrobat Pro 允许用户通过提供
UserPassword(如果已设置)来编辑 PDF 元数据。 相比之下,其他 PDF 阅读器(如 Foxit)除了要求用户提供 OwnerPassword 以编辑 PDF 元数据外,还要求用户提供 UserPassword 以打开和查看 PDF。准备开始了吗?
Nuget 下载 17,012,929 | 版本: 2025.12 刚刚发布






