Pdf lets you create documents, which not only hold texts but also graphics, annotations, attachments, and much more. It also lets you set many document-related properties as per your requirements. Lets discuss some basic operations that can be performed in Pdf in the following section.
In PDF, you can create an instance of the C1PdfDocument class to create a new PDF document as showcased in the following code:
C# |
Copy Code
|
---|---|
// Create the C1PdfDocument object. C1PdfDocument pdf = new C1PdfDocument(); |
Apart from creating documents and adding content to it, PDF also let you set various document properties to change the basic information of the document. The DocumentInfo class provides various properties to set the author, title, subject, creator, and much more for the PDF document. To set the document properties in PDF, use the following code.
C# |
Copy Code
|
---|---|
//Set document properties pdf.DocumentInfo.Title = "PDF Creation"; pdf.DocumentInfo.Author = "I. Author"; pdf.DocumentInfo.Subject = "PDF"; pdf.DocumentInfo.Keywords = "PDF, creating PDF, PDF files, eBooks"; pdf.DocumentInfo.Creator = "My New Application"; pdf.DocumentInfo.Producer = "PDF Creation Industries"; |