2 Replies Latest reply on Nov 28, 2012 11:11 PM by csm_phil

    Convert .indd into .rtf and .txt

    BEGINNER_X Level 3

      Hi All,

       

      I am a Beginner. I want to clarify how to convert indesign file into RTF or TXT format.

       

      Studying through "InDesignCS3_ScriptingGuide_JS" in Page 33

       

      Convert .indd file into .pdf:

       

      Codings are below(working fine)

       

      var myPDFPresets = app.pdfExportPresets.item("Prepress")

      var mySave = File(Folder.desktop+'/'+app.activeDocument.name+'.pdf')

      var myExportPDF = app.activeDocument.exportFile(ExportFormat.pdfType, mySave, false, myPDFPresets)

       

       

      But i need indesign file into RTF and TXT format.

       

      Below coding not working fine

       

      //indd into RTF

       

      var myPDFPresets = app.pdfExportPresets.item("Prepress")

      var mySave = File(Folder.desktop+'/'+app.activeDocument.name+'.rtf')

      var myExportPDF = app.activeDocument.exportFile(ExportFormat.rtf, mySave, false, myPDFPresets)

       

       

      //indd into TXT

       

      var myPDFPresets = app.pdfExportPresets.item("Prepress")

      var mySave = File(Folder.desktop+'/'+app.activeDocument.name+'.txt')

      var myExportPDF = app.activeDocument.exportFile(ExportFormat.textType, mySave, false, myPDFPresets)

       

       

      Can anyone give solution if you willing.

       

      Thanks in advance

      BEGINNER

        • 1. Re: Convert .indd into .rtf and .txt
          Vamitul Level 4

          in the sample scripts provided by adobe, there is a script called "//ExportAllStories.jsx"

          study it, it will be helpful.

           

          short story, rtf and txt export works for stories objects, not for document object.

          • 2. Re: Convert .indd into .rtf and .txt
            csm_phil Level 4

            Hi Beginner,

             

            Have you tried with manually export to the RTF format, It ask to choose the PDF preset in that time. Never.

            var myExportPDF = app.activeDocument.exportFile(ExportFormat.rtf, mySave, false, myPDFPresets)

            Please analyze the code first, and after you copy and paste and test it. In RTF format there is no need in the Presets.

             

            Also, Vamitul told the ExportAllStories.jsx you just check it out and study.

             

            thx,

            csm_phil.