Back to Devexpress

PdfExportOptions.RasterizationResolution Property

officefileapi-devexpress-dot-docs-dot-presentation-dot-export-dot-pdfexportoptions-81e4cbf4.md

latest2.6 KB
Original Source

PdfExportOptions.RasterizationResolution Property

Specifies the resolution (in DPI) used to rasterize vector images during export.

Namespace : DevExpress.Docs.Presentation.Export

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

NuGet Package : DevExpress.Docs.Presentation

Declaration

csharp
public int RasterizationResolution { get; set; }
vb
Public Property RasterizationResolution As Integer

Property Value

TypeDescription
Int32

The resolution (in DPI) used to rasterize vector images.

|

Remarks

Set the PdfExportOptions.RasterizeImages property to true to apply the resolution specified by the RasterizationResolution property.

Example

The following code snippet enables rasterization and sets the resolution to 96:

csharp
using DevExpress.Docs.Pdf;
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.RasterizeImages = true;
    options.RasterizationResolution = 96;
    presentation.ExportToPdf(new FileStream("C:\\Documents\\Presentation.pdf", FileMode.Create, FileAccess.ReadWrite), options);
}
vb
Imports DevExpress.Docs.Pdf
Imports DevExpress.Docs.Presentation
Imports DevExpress.Docs.Presentation.Export

Using presentation = New Presentation(File.ReadAllBytes("C:\Documents\Presentation.pptx"))
  Dim options = New PdfExportOptions()
  options.RasterizeImages = True
  options.RasterizationResolution = 96
  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