Managing Metadata Visibility in PDFs
What is visible in the Metadata categories?
Metadata is visible to anyone able to open a PDF. These details include the following items:
// 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
' 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
- When only an Owner Password is set, users have full access to the PDF metadata, including the ability to view and modify all document properties.
- When only a User Password is set, the PDF can only be opened by those with the password. Users can view the metadata properties, but modifying the metadata is restricted.
UserPassword
if it is set. In contrast, other PDF viewers like Foxit require users to provide the OwnerPassword
to edit the PDF metadata, in addition to the UserPassword
for opening and viewing the PDF.