Document.CustomProperties Property

Gets or sets a value indicating the custom properties of the Document .

public CustomPropertyList CustomProperties { get; }
Public Property CustomProperties As CustomPropertyList

Property Value

CustomPropertyList

Licensing Info

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples

This example shows how to add custom properties to the document.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
     
Module MyModule
     
    Sub Main()

		 'Create a PDF Document
        Dim document As Document = New Document

        ' Create a page and add it to the document
        Dim page As Page = New Page
        document.Pages.Add(page)

        page.Elements.Add(New Label("Document custom properties", 0, 0, 400, 100))

        'Add custom properties to the document
        Dim list As CustomPropertyList = document.CustomProperties
        list.Add("name1", "value1")
        list.Add("name2", "value2")
        list.Add("name3", "value3")
        list.Add("name4", "value4")

        ' Save the PDF document
        document.Draw(outputPath)  

    End Sub
End Module
using System;
using ceTe.DynamicPDF;	

public class Example 
{
    public static void CreatePDF(string outputPath)
    {
        // Create a PDF Document
        Document document = new Document();

        // Create a Page and add it to the document
        Page page = new Page();
        document.Pages.Add(page);

        page.Elements.Add(new Label("Document custom properties", 0, 0, 400, 100));

        // Add custom properties to the document
        CustomPropertyList list = document.CustomProperties;
        list.Add("name1", "value1");
        list.Add("name2", "value2");
        list.Add("name3", "value3");
        list.Add("name4", "value4");

        // Save the PDF document
        document.Draw(outputPath);
    }
}

See Also

Document
ceTe.DynamicPDF

In this topic