Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxPSPDFReportExportOptions.JPEGQuality Property

Specifies the JPEG quality level (as a percentage) for compressed images.

#Declaration

Delphi
property JPEGQuality: Integer read; write; default 90;

#Property Value

Type Default Description
Integer 90

The JPEG quality level for compressed images, as a percentage.

#Remarks

The JPEG image format uses a lossy compression algorithm that trades quality for compression. The amount of compression is measured as a percentage of the base quality level.

You can use the JPEGQuality property to adjust the quality of images in exported PDF documents when the UseJPEGCompression property is set to True (default).

#Property Values

The following JPEGQuality property value threshold correspond to different JPEG image quality levels:

100
An export operation results in minimum image quality loss.
90
Images in exported PDF documents are considered high-quality JPEG images.
80
This threshold corresponds to medium quality JPEG images in exported documents.
70
This threshold corresponds to low quality JPEG images.
070
Any value below 70 corresponds to very low quality JPEG images.

#Code Example

The following code example creates a report link for an existing Chart control, customizes report link settings, exports control content to a PDF document file, and deletes the created report link:

uses
  dxPSdxChartControlLnk;  // This unit declares the TdxChartControlReportLink class
// ...
var
  AReportLink: TBasedxReportLink;
begin
  // Creates a Chart control report link
  AReportLink := dxComponentPrinter1.AddEmptyLinkEx(TdxChartControlReportLink, dxChartControl1);
  AReportLink.Component := dxChartControl1;  // Associates the created report link with the source control
  try
    AReportLink.PDFExportOptions.JPEGQuality := 80;  // Adjusts the JPEG compression rate for export
    AReportLink.PDFExportOptions.OpenDocumentAfterExport := True; // Opens the resulting document after export
    AReportLink.ExportToPDF;  // Displays "PDF Export Options" and "Save As" dialogs
  finally
    dxComponentPrinter1.DeleteLink(AReportLink.Index); // Deletes the report link after export
  end;
end;

VCL Printing System: A PDF Document with Exported Chart Content

#Default Value

The JPEGQuality property’s default value is 90.

See Also