Back to Devexpress

PdfExportOptions.DocumentOptions Property

officefileapi-devexpress-dot-docs-dot-presentation-dot-export-dot-pdfexportoptions-c00a3d56.md

latest2.9 KB
Original Source

PdfExportOptions.DocumentOptions Property

Obtains Document Properties of a PDF file.

Namespace : DevExpress.Docs.Presentation.Export

Assembly : DevExpress.Docs.Presentation.v25.2.dll

NuGet Package : DevExpress.Docs.Presentation

Declaration

csharp
public DocumentExportOptions DocumentOptions { get; }
vb
Public ReadOnly Property DocumentOptions As DocumentExportOptions

Property Value

TypeDescription
DocumentExportOptions

An object that contains Document Properties settings.

|

Example

The following code snippet specifies available document properties:

csharp
using DevExpress.Docs.Presentation;
using DevExpress.Docs.Presentation.Export;
//...

using (var presentation = new Presentation(File.ReadAllBytes("C:\\Documents\\Presentation.pptx")))
{
    var options = new PdfExportOptions();
    options.DocumentOptions.Author = "Simon Peacock";
    options.DocumentOptions.Application = "DevExpress Presentation API";
    options.DocumentOptions.Keywords = "Presentation, DevExpress, Exported, PDF";
    options.DocumentOptions.Producer = "Developer Express Inc., 25.1.3.0";
    options.DocumentOptions.Subject = "Test Presentation";
    options.DocumentOptions.Title = "Presentation Title";
    presentation.ExportToPdf(new FileStream("C:\\Documents\\Presentation.pdf", FileMode.Create, FileAccess.ReadWrite), options);
}
vb
Imports DevExpress.Docs.Presentation
Imports DevExpress.Docs.Presentation.Export
'...
Using presentation = New Presentation(File.ReadAllBytes("C:\Documents\Presentation.pptx"))
  Dim options = New PdfExportOptions()
  options.DocumentOptions.Author = "Simon Peacock"
  options.DocumentOptions.Application = "DevExpress Presentation API"
  options.DocumentOptions.Keywords = "Presentation, DevExpress, Exported, PDF"
  options.DocumentOptions.Producer = "Developer Express Inc., 25.1.3.0"
  options.DocumentOptions.Subject = "Test Presentation"
  options.DocumentOptions.Title = "Presentation Title"
  presentation.ExportToPdf(new FileStream("C:\Documents\Presentation.pdf", FileMode.Create, FileAccess.ReadWrite), options)
End Using

See Also

PdfExportOptions Class

PdfExportOptions Members

DevExpress.Docs.Presentation.Export Namespace