How to export PNG with 300 res using Applescript

Participant ,
Jun 03, 2016

Copy link to clipboard

Copied

How to export PNG with 300 res in Applescript

i want to copy a art and paste in new document and export as PNG to desktop location, & file name should be my previous doc were i copy file form. and saved file should be filename_PNG.png   

set saveLocation to ((path to desktop) as string)

tell application "Adobe Illustrator"

if not frontmost then activate

if (count documents) > 0 then

set selectedItems to selection of current document

if selectedItems is not {} then

copy

set colorSpace to color space of current document

make new document with properties {color space:colorSpace}

paste

end if

end if

end tell

tell application "Adobe Illustrator"

tell document 1

set SelectedArt to visible bounds

set artboard rectangle of artboard 1 to SelectedArt

export current document to file newFilePath as PNG8 ¬

with options {class:PNG8 export options ¬

, color count:64 ¬ , color reduction:web ¬

, color dither:pattern dither ¬

, dither percent:50 ¬

, interlaced:true}

close current document saving no

end tell

end tell

TOPICS
Scripting

Views

887

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

1 Correct Answer

Adobe Community Professional , Jun 03, 2016
Larry G. Schneider Adobe Community Professional , Jun 03, 2016
You will have to set the scale to 416.67% (both horizontal and vertical). The default export at 100% will give you a 72 ppi PNG.

Likes

Translate

Translate
Jump to answer Jump to answer
Adobe Community Professional ,
Jun 03, 2016

Copy link to clipboard

Copied

You will have to set the scale to 416.67% (both horizontal and vertical). The default export at 100% will give you a 72 ppi PNG.

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
Participant ,
Jun 10, 2016

Copy link to clipboard

Copied

Thanks Larry G. Schneider

Can you tell about JPEG 300 Res, can i use the same 416.67 (both horizontal and vertical).

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
Adobe Community Professional ,
Jun 10, 2016

Copy link to clipboard

Copied

Yes, with the caution that will need to be resized to 100% in the app where you place the raster file.

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