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,
Incredible, I sent a bug report to Corel Support. They are requiring ALL the details of my machine and installation to even look on non implemented function !!
For a bug that has been on for more than 10 years, when they only need seconds to check...
Never seen such a bad faith support in my life!
That does not surprise me at all. I once had a ticket open with Corel for 6 months. I would hear back from the Corel employee every month or 2 with more questions so they could look into the issue. Around month 4 they stopped responding. I sent an email requesting an update 2 months later. I received a response from another Corel employee, this time from Europe (I work in the US). Stating that the employee I had been working with had left the company and support had been consolidated and furthermore, my issue because it was with a Visual Studio addon created by Corel themselves and not CorelDraw itself, was not an issue support could handle so they were closing the ticket.