Copy link to clipboard
I am working on a plugin for CC 2019 that can export selection on a document as png.
I looked into APIs in the C++ SDK similar to this API from the Scripting SDK,
But, I couldn't find one.
There are only options to export the whole document.
Am I missing anything?
Did you manage to solve your issue? I also am trying to do something similar but cannot find the right API call.
No, couldn't find anything in the C++ SDK to do this.
In the end, I implemented this by hiding everything except the selection, resizing the artboard to the selection, and then exporting the document.
The end result was the desired result.
You'll have to handle different scenarios such as multiple artboards etc.
this worksapp.activeDocument.exportSelectionAsPNG(File("C:/path/to/selection.png"));Trying to set the resolution on this to 300ppi for a garment printer. Line taken from: https://community.adobe.com/t5/illustrator-discussions/how-to-do-quot-export-selection-quot-in-illus...