API Documentation > CorelDRAW > 2025-v26 > PDFVBASettings > IPDFVBASettings
PDFVBASettings.GrayResolution property
Specifies the downsampling resolution for grayscale bitmaps
Syntax:
Property Get GrayResolution() As Long
Property Let GrayResolution(ByVal Value As Long)
Remarks:
The GrayResolution property specifies the resolution for downsampled grayscale bitmaps when publishing to PDF. In order to apply the resolution, the PDFVBASettings.DownsampleGray option must be specified as True.
Examples:
The following VBA example publishes the active document to PDF. Color and grayscale bitmaps are downsampled to 72 dpi, and monochrome bitmaps are downsampled to 150 dpi.
Sub Test()
With ActiveDocument.PDFSettings
  .DownsampleColor = True
  .DownsampleGray = True
  .DownsampleMono = True
  .ColorResolution = 72
  .GrayResolution = 72
  .MonoResolution = 150
End With
ActiveDocument.PublishToPDF "C:\MyDocument.pdf" 
End Sub