Back to Devexpress

PdfExportOptions.ImageQuality Property

corelibraries-devexpress-dot-xtraprinting-dot-pdfexportoptions-6fb1099c.md

latest5.5 KB
Original Source

PdfExportOptions.ImageQuality Property

Gets or sets the quality of images in the resulting PDF file.

Namespace : DevExpress.XtraPrinting

Assembly : DevExpress.Printing.v25.2.Core.dll

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
[DefaultValue(PdfJpegImageQuality.Highest)]
public PdfJpegImageQuality ImageQuality { get; set; }
vb
<DefaultValue(PdfJpegImageQuality.Highest)>
Public Property ImageQuality As PdfJpegImageQuality

Property Value

TypeDefaultDescription
PdfJpegImageQualityHighest

A PdfJpegImageQuality enumeration value which specifies the quality of images in the resulting PDF file.

|

Available values:

NameDescription
Lowest

The resulting Jpeg image quality is the lowest (the resulting PDF file size is the smallest ).

| | Low |

The resulting Jpeg image quality is low (the resulting PDF file size is small ).

| | Medium |

The resulting Jpeg image quality is medium (the resulting PDF file size is also medium ).

| | High |

The resulting Jpeg image quality is high (the resulting PDF file size is big ).

| | Highest |

The resulting Jpeg image quality is the highest (the resulting PDF file size is the biggest ).

|

Property Paths

You can access this nested property as listed below:

LibraryObject TypePath to ImageQuality
Cross-Platform Class LibraryExportOptions

.Pdf .ImageQuality

| | WinForms Controls | DiagramOptionsExport |

.PdfExportOptions .ImageQuality

| | WPF Controls | DiagramControl |

.PdfExportOptions .ImageQuality

|

Remarks

When exporting a document to PDF, you can control the resulting file size. Enable the PdfExportOptions.ConvertImagesToJpeg option to reduce the size of the resulting PDF document by compressing the original images to JPEG.

In this case, you can use the ImageQuality property to specify the required quality of PDF-embedded images. Increasing the quality of document images may result in a large file size, and vise versa, degrading the quality reduces the file size.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ImageQuality property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-richeditcontrol-common-api/CS/RichEditAPISample/CodeExamples/RichEditControlActions.cs#L390

csharp
options.Compressed = false;
options.ImageQuality = DevExpress.XtraPrinting.PdfJpegImageQuality.High;
//Export the document to the file:

word-document-api-examples/CS/CodeExamples/ExportActions.cs#L79

csharp
options.Compressed = false;
options.ImageQuality = PdfJpegImageQuality.Highest;

winforms-richeditcontrol-common-api/VB/RichEditAPISample/CodeExamples/RichEditControlActions.vb#L397

vb
options.Compressed = False
options.ImageQuality = DevExpress.XtraPrinting.PdfJpegImageQuality.High
'Export the document to the file:

word-document-api-examples/VB/CodeExamples/ExportActions.vb#L73

vb
options.Compressed = False
options.ImageQuality = DevExpress.XtraPrinting.PdfJpegImageQuality.Highest
' Export the document to a stream in PDF format.

See Also

Export to PDF

PdfExportOptions Class

PdfExportOptions Members

DevExpress.XtraPrinting Namespace