Documents for Excel, .NET Edition Documentation
Manage File Operations / Export to a PDF File / Support Document Properties
In This Topic
    Support Document Properties
    In This Topic

    GcExcel provides support for document properties while saving Excel spreadsheets to PDF documents. The document properties contain the basic information about a document, such as title, author, creation date, subject, creator, version etc. You can store such useful information in the exported PDF document. 

    The DocumentProperties class contains the properties such as PdfVersion, EmbedStandardWindowsFonts, Title, Author, Subject, Keywords, Creator, Producer, CreationDate and ModifyDate.

    Using Code

    Refer to the following example code to add document properties in the exported PDF document.

    C#
    Copy Code
    DocumentProperties documentProperties = new DocumentProperties();
    //Sets the name of the person that created the document
    documentProperties.Author = "Will Smith";
    //Sets the title of the document
    documentProperties.Title = "Document properties Info Sample";
    //Sets the subject of the document
    documentProperties.Subject = "PDF created from GcExcel";
    //Do not embed a font
    documentProperties.EmbedStandardWindowsFonts = false;
    
    PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
    //Sets the DocumentProperties of the pdf
    pdfSaveOptions.DocumentProperties = documentProperties;