# Support Document Properties

With DsExcel, you can store useful document information while saving Excel spreadsheets to PDF documents such as title, author, etc.

## Content

DsExcel 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](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.DocumentProperties.html) class contains the properties such as [PdfVersion](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.DocumentProperties.PdfVersion.html), [EmbedStandardWindowsFonts](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.DocumentProperties.EmbedStandardWindowsFonts.html), [Title](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.DocumentProperties.Title.html), [Author](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.DocumentProperties.Author.html), [Subject](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.DocumentProperties.Subject.html), [Keywords](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.DocumentProperties.Keywords.html), [Creator](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.DocumentProperties.Creator.html), [Producer](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.DocumentProperties.Producer.html), [CreationDate](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.DocumentProperties.CreationDate.html) and [ModifyDate](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.DocumentProperties.ModifyDate.html).

## Using Code

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

```csharp
//create a pdf file stream
FileStream outputStream = new FileStream("setdocumentpropertiestopdf.pdf", FileMode.Create);

//create a new workbook
var workbook = new GrapeCity.Documents.Excel.Workbook();

IWorksheet worksheet = workbook.Worksheets[0];
worksheet.Range["A1"].Value = "Documents for Excel";
worksheet.Range["A1"].Font.Size = 25;

DocumentProperties documentProperties = new DocumentProperties
{
    //Sets the name of the person that created the PDF document.
    Author = "Jaime Smith",
    //Sets the title of the  PDF document.
    Title = "GcPdf Document Info Sample",
    //Do not embed a font.
    EmbedStandardWindowsFonts = false,
    //Set the PDF version.
    PdfVersion = 1.5f,
    //Set the subject of the PDF document.
    Subject = "GcPdfDocument.DocumentInfo",
    //Set the keyword associated with the PDF document.
    Keywords = "Keyword1",
    //Set the creation date and time of the PDF document.
    CreationDate = DateTime.Now.AddYears(10),
    //Set the date and time the PDF document was most recently modified.
    ModifyDate = DateTime.Now.AddYears(11),
    //Set the name of the application that created the original PDF document.
    Creator = "GcPdfWeb Creator",
    //Set the name of the application that created the PDF document.
    Producer = "GcPdfWeb Producer"
};

PdfSaveOptions pdfSaveOptions = new PdfSaveOptions
{
    //Sets the document properties of the pdf.
    DocumentProperties = documentProperties
};

//Save the workbook into pdf file.
workbook.Save(outputStream, pdfSaveOptions);
        
//close the pdf stream
outputStream.Close();
```