PublishToPDF macro bug

I am having trouble with producing pdf files where all objects are output as RGB. Design objects made with Pantone spot colors are not converted to RGB colors when the pdf is produced. 

When using the built in Publish to pdf function it works fine, but when I record the same settings to a macro the debugger stops executing the macro at he yellow line in the code below.

Anyone having a workaround or solution? I have tried all possible settings and combinations to no luck. 

Sub pdf_spot_to_rgb()

' Recorded 27.01.2016
With ActiveDocument.PDFSettings
.PublishRange = 0 ' CdrPDFVBA.pdfWholeDocument
.PageRange = "1"
.Author = "Vidar Strand"
.Subject = ""
.Keywords = ""
.BitmapCompression = 2 ' CdrPDFVBA.pdfJPEG
.JPEGQualityFactor = 25
.TextAsCurves = False
.EmbedFonts = True
.EmbedBaseFonts = True
.TrueTypeToType1 = True
.SubsetFonts = True
.SubsetPct = 80
.CompressText = True
.Encoding = 1 ' CdrPDFVBA.pdfBinary
.DownsampleColor = True
.DownsampleGray = True
.DownsampleMono = True
.ColorResolution = 150
.MonoResolution = 400
.GrayResolution = 200
.Hyperlinks = True
.Bookmarks = True
.Thumbnails = False
.Startup = 0 ' CdrPDFVBA.pdfPageOnly
.ComplexFillsAsBitmaps = False
.Overprints = True
.Halftones = False
.MaintainOPILinks = False
.FountainSteps = 256
.EPSAs = 0 ' CdrPDFVBA.pdfPostscript
.pdfVersion = 6 ' CdrPDFVBA.pdfVersion15
.IncludeBleed = False
.Bleed = 31750
.Linearize = False
.CropMarks = False
.RegistrationMarks = False
.DensitometerScales = False
.FileInformation = False
.ColorMode = 0 ' CdrPDFVBA.pdfRGB
.UseColorProfile = True
.ColorProfile = 1 ' CdrPDFVBA.pdfSeparationProfile
.EmbedFilename = ""
.EmbedFile = False
.JP2QualityFactor = 25
.TextExportMode = 0 ' CdrPDFVBA.pdfTextAsUnicode
.PrintPermissions = 0 ' CdrPDFVBA.pdfPrintPermissionNone
.EditPermissions = 0 ' CdrPDFVBA.pdfEditPermissionNone
.ContentCopyingAllowed = False
.OpenPassword = ""
.PermissionPassword = ""
.EncryptType = 1 ' CdrPDFVBA.pdfEncryptTypeStandard
.OutputSpotColorsAs = 1 ' CdrPDFVBA.pdfSpotAsRGB
.OverprintBlackLimit = 95
End With
ActiveDocument.PublishToPDF "Y:\Firma\Corel Stuff\X7\Bug\spot_to_rgb_bug.pdf"

End Sub

spot_to_rgb_bug.cdr

Parents
No Data
Reply
  • Interesting. It looks like Corel hasn't implemented the IPDFVBASettings::UseColorProfile property... reading the property always returns True, when you try to write to it you get an E_NOTIMPL error (VBA doesn't report this very well, but you can see this result if you call it from another language).

    I would suggest just deleting the offending line, since it doesn't look like it does anything anyway.
Children
No Data