I’m encountering an issue with publishing PDFs using VBA. Despite having bitmaps in CorelDRAW with lower resolutions, the published PDF is converting all bitmaps to a higher resolution. How can I resolve this problem?
With ActiveDocument.PDFSettings .PublishRange = 1 ' CdrPDFVBA.pdfCurrentPage .PageRange = "1" .Author = "CorelDraw" .Subject = "" .Keywords = "" .BitmapCompression = 2 ' CdrPDFVBA.pdfJPEG .JPEGQualityFactor = 2 .TextAsCurves = True .EmbedFonts = True .EmbedBaseFonts = True .TrueTypeToType1 = True .SubsetFonts = True .SubsetPct = 80 .CompressText = True .Encoding = 1 ' CdrPDFVBA.pdfBinary .DownsampleColor = True .DownsampleGray = True .DownsampleMono = True .ColorResolution = 1200 'Resolution .MonoResolution = 2400 'Resolution * 2 .GrayResolution = 1200 ' Resolution .Hyperlinks = False .Bookmarks = False .Thumbnails = False .Startup = 0 ' CdrPDFVBA.pdfPageOnly .ComplexFillsAsBitmaps = False .Overprints = True .Halftones = False .MaintainOPILinks = False .FountainSteps = 999 .EPSAs = 0 ' CdrPDFVBA.pdfPostscript .pdfVersion = 0 ' CdrPDFVBA.pdfVersion12 .IncludeBleed = False .Bleed = 31750 .Linearize = False .CropMarks = False .RegistrationMarks = False .DensitometerScales = False .FileInformation = False .ColorMode = ColorSpace ' CdrPDFVBA.pdfNative '.UseColorProfile = True .ColorProfile = 1 ' CdrPDFVBA.pdfSeparationProfile .EmbedFilename = FileNameText.text '"" .EmbedFile = False .JP2QualityFactor = 2 .TextExportMode = 0 ' CdrPDFVBA.pdfTextAsUnicode .PrintPermissions = 0 ' CdrPDFVBA.pdfPrintPermissionNone .EditPermissions = 0 ' CdrPDFVBA.pdfEditPermissionNone .ContentCopyingAllowed = False .OpenPassword = "" .PermissionPassword = "" .EncryptType = 2 ' CdrPDFVBA.pdfEncryptTypeAES .OutputSpotColorsAs = OutputSpace ' CdrPDFVBA.pdfSpotAsSpot .OverprintBlackLimit = 100 .ProtectedTextAsCurves = True End With
understand these parameters and correct them to the ones you need
.ColorResolution = 1200 'Resolution.MonoResolution = 2400 'Resolution * 2.GrayResolution = 1200 ' Resolution
This is the DPI for color, gray and monochrome rasters
I understand it.
Those were defined for downsampling purposes but not for resampling purposes. Downsampling means if the image resolution is greater than "Resolution" then downsample to the resolution else unchanged.
.DownsampleColor = True.DownsampleGray = True.DownsampleMono = True.ColorResolution = 1200 'Resolution.MonoResolution = 2400 'Resolution * 2.GrayResolution = 1200 ' Resolution
I understand it this way - if = True in the macro code, ALL corresponding rasters are changed to the set resolution.This is easy to check - reduce the number from 1200 to 300 and look at the result...
I checked it myself - my statement is incorrect
I tried both true and false but the same results. 150dpi rasters converting to 1200 dpi
does this only happen with VBA?the standard Publish to PDF - does the conversion work ok?
this is only with vba but not with standard export or save as or publish to pdf dialog boxes. they do not resample to resolution.
maybe several files for example - VBA code (gms), CDR and result in PDF?