How to export selection in a doc as png?

Engaged ,
May 06, 2019

Copy link to clipboard

Copied

Hi,

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,

app.activeDocument.exportSelectionAsPNG(fileSpec);

But, I couldn't find one.

There are only options to export the whole document.

Am I missing anything?

TOPICS
SDK

Views

272

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
Jan 19, 2021

Copy link to clipboard

Copied

Did you manage to solve your issue? I also am trying to do something similar but cannot find the right API call. 

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
poortip87 AUTHOR LATEST
Engaged ,
Jan 19, 2021

Copy link to clipboard

Copied

Hi,

 

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.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more