• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Export to PNG saves as blank script Illustrator CS6

New Here ,
Jul 14, 2020 Jul 14, 2020

Copy link to clipboard

Copied

I have the below script to export as PNG. It works well in CC, but when performed in Illustrator CS6, it saves as blank PNG file. No contents are appearing.

 

 

function exportToPNGFile(locToSave) {
var doc = app.activeDocument;
var exportOptions= new ExportOptionsPNG24 ();
var type= ExportType.PNG24;
var fileSpec= new File(locToSave);

exportOptions.artBoardClipping = false;
exportOptions.antiAliasing= false;
exportOptions.transparency= false;
exportOptions.horizontalScale = 100.0;
exportOptions.verticalScale = 100.0;

doc.exportFile(fileSpec, type, exportOptions);

}

 

TOPICS
Import and export , Scripting

Views

442

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guide ,
Jul 14, 2020 Jul 14, 2020

Copy link to clipboard

Copied

It works fine for me in CS6.  Please excuse the obvious question:  There is no function call in the above snippet; you are calling the function exportToPNGFile("your path..."), aren't you?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 01, 2020 Aug 01, 2020

Copy link to clipboard

Copied

Hi. I have included the same.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 14, 2020 Jul 14, 2020

Copy link to clipboard

Copied

your script works ok in both CC and CS6 here on Windows 10

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 01, 2020 Aug 01, 2020

Copy link to clipboard

Copied

LATEST

But i have CS6 (16.3.2) it is saves as Blank png. It works wells in Illustrator 2020

Votes

Translate

Translate

Report

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