管理PDF中的元資料可見性
Curtis Chau
Updated: 2025年6月10日
在元資料類別中可見的內容是什麼?
能夠打開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- 當只有設置擁有者密碼時,使用者可以完全存取PDF元資料,包括查看和修改所有文件屬性的能力。
- 當只有設置使用者密碼時,僅有密碼的人才能打開PDF。 使用者可以查看元資料屬性,但修改元資料是有限制的。
請注意: Adobe Acrobat Pro允許使用者通過提供
UserPassword來編輯PDF元資料(如果有設置)。 相比之下,其他PDF查看器如Foxit要求使用者提供OwnerPassword來編輯PDF元資料,此外還需提供UserPassword來打開和查看PDF。
技術作家
Curtis Chau擁有Carleton大學的電腦科學學士學位,專精於前端開發,擁有Node.js、TypeScript、JavaScript和React的專業知識。Curtis熱衷於建立直觀且美觀的使用者介面,喜愛使用現代框架並建立結構良好、視覺吸引力的手冊。
...
閱讀更多