Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

How to export an indd document (selection) as PNG?

$
0
0

Dear all,

 

I have couple of indd document and each has one table (also one page per document). i want to convert that table to PNG. I tried to do so but the result exported with page size.

I am unable to select that Table's text frame.

 

#target Indesign

var sourceFolder = new Folder ("/Users/admin4/Desktop/INS");

 

var myFiles = sourceFolder.getFiles();

//alert (myFiles.length);

 

var destFolder = new Folder ("/Users/admin4/Desktop/folder5");

 

//var destFile = new File(destFolder + "/" + i + ".png");

//alert(destFile);

 

for (i=0; i < myFiles.length; i++)

{

     var sourceDoc = app.open(myFiles[i]);

 

    var destFile = new File(destFolder + "/" + myFiles[i].name + ".png");

   

     sourceDoc.exportFile(ExportFormat.PNG_FORMAT, destFile, false);  

     sourceDoc.close(SaveOptions.NO);

   

    }

 


Viewing all articles
Browse latest Browse all 15932

Trending Articles