5 Replies Latest reply on Jul 9, 2013 5:43 AM by virender_CTS

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

    virender_CTS Level 1

      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);

         

          }