管理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)除了需要使用者UserPassword用於開啟和檢視 PDF)外,還需要使用者提供OwnerPassword才能編輯 PDF 元資料。準備好開始了嗎?
Nuget 下載 17,012,929 | 版本: 2025.12 剛剛發布






