public PDFDocumentProperties DocumentProperties { get; set; }
public String getDocumentProperties();
public void setDocumentProperties(
java.lang.String string
);
public:
property PDFDocumentProperties^ DocumentProperties {
PDFDocumentProperties^ get();
void set ( PDFDocumentProperties^ );
}
DocumentProperties # get and set (PDFFile)
A PDFDocumentProperties that contain the PDF document properties or metadata used with this PDFFile. The default value is null .
This property is used by this PDFFile in multiple ways:
This property will be populated with the PDF document filename property set in FileName after you call the Load method.
You can also use the loaded properties, modify it or completely set your own object and then use it to update the properties of the created or updated PDF by the Convert, Distill, DeletePages, InsertPagesFrom and ReplacePagesFrom methods
using Leadtools.WinForms;
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Controls;
using Leadtools.Drawing;
using Leadtools.ImageProcessing;
using Leadtools.Pdf;
using Leadtools.Svg;
public void PDFFileExample()
{
string sourceFileName = Path.Combine(LEAD_VARS.ImagesDir, @"Leadtools.pdf");
string destFileName = Path.Combine(LEAD_VARS.ImagesDir, @"LEAD_14.pdf");
// Load the properties of the file
ShowProperties("Source file", sourceFileName);
// Update the properties of the file
PDFFile file = new PDFFile(sourceFileName);
file.DocumentProperties = new PDFDocumentProperties();
file.DocumentProperties.Author = "Me";
file.DocumentProperties.Title = "My title";
file.DocumentProperties.Subject = "My subject";
file.DocumentProperties.Creator = "My application";
file.DocumentProperties.Modified = DateTime.Now;
file.SetDocumentProperties(destFileName);
// Show the properties of the new file
ShowProperties("Destination file", destFileName);
}
private static void ShowProperties(string message, string fileName)
{
Console.WriteLine(message);
// Get the properties of the file
PDFFile file = new PDFFile(fileName);
file.Load();
PDFDocumentProperties props = file.DocumentProperties;
Console.WriteLine(" Title: {0}", props.Title);
Console.WriteLine(" Author: {0}", props.Author);
Console.WriteLine(" Subject: {0}", props.Subject);
Console.WriteLine(" Keywords: {0}", props.Keywords);
Console.WriteLine(" Creator: {0}", props.Creator);
Console.WriteLine(" Producer: {0}", props.Producer);
Console.WriteLine(" Created: {0}", props.Created);
Console.WriteLine(" Modified: {0}", props.Modified);
Console.WriteLine("----------:");
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document