Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Export table present in indesign file as PNG?

$
0
0

Dear all,

 

I have 10 indd files and each file has one page and a table is only item present on page. So few indd files has table present in one textbox and few files has table in two text boxes because table has many rows so spiltted in two linked text boxes.

I somehow able to select both text boxes but while exporting them only one text box table get exported as png because of improper code.

Pls help.

app.selection[0].exportFile(ExportFormat.PNG_FORMAT, destFile, false);        // here i need to correct code.

 

 

#target Indesign

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

var myFiles = sourceFolder.getFiles();

 

//alert (myFiles.length);

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

 

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

{

     if (myFiles[i].name !=".DS_Store")

     {

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

    

     app.activeDocument.pageItems.everyItem().select();

 

     //app.activeDocument.stories[0].tables[0].parent.select();

 

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

 

     app.selection[0].exportFile(ExportFormat.PNG_FORMAT, destFile, false);  

     // here i need to correct code.

 

     sourceDoc.close(SaveOptions.NO);

 

    }

}


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>