Hi,
I have written a application in .NET for automating CorelDraw..
I have a VB function designed for exporting PDF using always the same parameters. All is working fine apart from parameter UseColorProfile which has been throwing an "not_implemented" exception since X6. I just upgraded from x8 to 2018 and the problem is still here.
Below is the function code , this line which throw the exception isMe.doc.PDFSettings().UseColorProfile = False
Has anybody got an idea ? Am I missing something ? Can I report that as a bug and where can I do so ?
Public Function ExportPDF(ByVal sFullName As String, ByVal size As Double, ByVal resolution As Integer) Try Me.doc.CreateSelection(Me.doc.Pages.Item(currentpage).Shapes.All) If size > 0 Then ResizeDocAndDraw(size, resolution) Else Me.doc.Resolution = resolution End If Me.doc.PDFSettings().PublishRange = 1 ' CdrPDFVBA.pdfWholeDocument Me.doc.PDFSettings().PageRange = "" Me.doc.PDFSettings().Author = "hga" Me.doc.PDFSettings().Subject = "" Me.doc.PDFSettings().Keywords = "" Me.doc.PDFSettings().BitmapCompression = CorelDRAW.pdfBitmapCompressionType.pdfZIP Me.doc.PDFSettings().JPEGQualityFactor = 2 Me.doc.PDFSettings().TextAsCurves = True Me.doc.PDFSettings().EmbedFonts = False Me.doc.PDFSettings().EmbedBaseFonts = False Me.doc.PDFSettings().TrueTypeToType1 = False Me.doc.PDFSettings().SubsetFonts = False Me.doc.PDFSettings().SubsetPct = 0 Me.doc.PDFSettings().CompressText = False Me.doc.PDFSettings().Encoding = CorelDRAW.pdfEncodingType.pdfBinary Me.doc.PDFSettings().DownsampleColor = False Me.doc.PDFSettings().DownsampleGray = False Me.doc.PDFSettings().DownsampleMono = False Me.doc.PDFSettings().ColorResolution = 300 Me.doc.PDFSettings().MonoResolution = 1200 Me.doc.PDFSettings().GrayResolution = 300 Me.doc.PDFSettings().Hyperlinks = True Me.doc.PDFSettings().Bookmarks = True Me.doc.PDFSettings().Thumbnails = False Me.doc.PDFSettings().Startup = CorelDRAW.pdfDisplayOnStart.pdfPageOnly Me.doc.PDFSettings().ComplexFillsAsBitmaps = False Me.doc.PDFSettings().Overprints = True Me.doc.PDFSettings().Halftones = True Me.doc.PDFSettings().SpotColors = True Me.doc.PDFSettings().MaintainOPILinks = True Me.doc.PDFSettings().FountainSteps = 256 Me.doc.PDFSettings().EPSAs = CorelDRAW.pdfEPSAs.pdfPreview Me.doc.PDFSettings().pdfVersion = CorelDRAW.pdfVersion.pdfVersion15 Me.doc.PDFSettings().IncludeBleed = False Me.doc.PDFSettings().Bleed = 0 Me.doc.PDFSettings().Linearize = False Me.doc.PDFSettings().CropMarks = False Me.doc.PDFSettings().RegistrationMarks = False Me.doc.PDFSettings().DensitometerScales = False Me.doc.PDFSettings().FileInformation = False Me.doc.PDFSettings().ColorMode = CorelDRAW.pdfColorMode.pdfNative Me.doc.PDFSettings().EmbedFilename = "" Me.doc.PDFSettings().EmbedFile = False Me.doc.PDFSettings().ColorProfile = CorelDRAW.pdfColorProfile.pdfSeparationProfile Me.doc.PDFSettings().JP2QualityFactor = 2 Me.doc.PDFSettings().TextExportMode = CorelDRAW.pdfTextExportMode.pdfTextAsAscii Me.doc.PDFSettings().PrintPermissions = CorelDRAW.pdfPrintPermissions.pdfPrintPermissionNone Me.doc.PDFSettings().EditPermissions = CorelDRAW.pdfEditPermissions.pdfEditPermissionNone Me.doc.PDFSettings().ContentCopyingAllowed = False Me.doc.PDFSettings().OpenPassword = "" Me.doc.PDFSettings().PermissionPassword = "" Me.doc.PDFSettings().ConvertSpotColors = False Me.doc.PDFSettings().EncryptType = CorelDRAW.pdfEncryptionType.pdfEncryptTypeNone Me.doc.PDFSettings().UseColorProfile = False Me.doc.PublishToPDF(sFullName) Return True Catch ex As Exception Console.WriteLine(String.Concat(New String() {ex.Source, ChrW(10), ex.Message, ChrW(10), ex.StackTrace})) Return False End TryEnd Function
Thank is advanced
Same issue in my applications version after version. My solution has been removing the line "Me.doc.PDFSettings().UseColorProfile" since it is not relevant for me to keep absolute consistence of colors. Give it a try.
Happy coding?
Regards,
Jaume Sanllehy
Hi Jaime,
That's also the solution I found.
My problem is that I need to generate as light as possible PDF files.They are sent to printing companies by mail and in any case they use either the Pantone colors or the CYMK codes and never use the color profile.
And if I left the checkbox checked when I use CorelDraw manually, the next time all my files are going to weigh an extra 1.2Mb. And I have to uncheck the box manually and regenerate the whole lot...
Apart from that I love the ease of programming the software compared to the pain in the b.. competitor APIs.
Now don't you think that should be reported as bug ? Do you know where to do that ?
Best,