Hi.
I'm trying to export to PNG with JavaScript in Corel Draw 2020 but the image is not exporting. I do not get an error either. Can anyone let me know what I'm doing wrong?
Thank you.
This is what I'm doing:
const opt = host.CreateStructExportOptions();opt.AntiAliasingType = host.cdrNormalAntiAliasing;opt.ImageType = host.cdrRGBColorImage;opt.Overwrite = true;const exportFileName = "C:\\test.png";host.ActiveDocument.Export(exportFileName, host.cdrPNG, host.cdrSelection, opt, undefined);
Tried changing the file name. Did nothing. The shape is on a printable layer.
by the way, "Export" is not function, try use
host.ActiveDocument.Export("C:\Test.jpg", host.cdrJPEG, host.cdrSelection, opt)
Same result.