5 Replies Latest reply on Jun 17, 2011 1:38 AM by Emmanuel Brochard

    Accessing errors in Indesign

    xmlapi Level 1

      How do I access the "errors panel" in Indesign (the one that shows missing fonts, overset text etc) using javascript?

        • 1. Re: Accessing errors in Indesign
          John Hawkinson Level 5

          Do you mean Live Preflight?

          • 2. Re: Accessing errors in Indesign
            csm_phil Level 4

            Hi,

             

            Can you please try this below line:

             

            app.scriptPreferences.userInteractionLevel=UserInteractionLevels.interactWithAll;
            
            

             

            thx

            csm_phil

            • 3. Re: Accessing errors in Indesign
              Emmanuel Brochard

              Hi,

               

              I don't know if it is what you meant but you can inspire from this following example to manipulate preflight from JS :

               

               

              try{
                  
                  // Basic
                  var preflightProfile = app.preflightProfiles.firstItem();
              
                  // Execution
                  $.writeln("Execution <" + preflightProfile.name + ">");
                  var preflightProcess = app.preflightProcesses.add(app.activeDocument, preflightProfile);
                  var preflightReturn = preflightProcess.waitForProcess();
                  preflightResults = preflightProcess.processResults;
                  $.writeln("Return value <" + preflightReturn + ">");
                  $.writeln("Return value <" + preflightResults + ">");
              
                  // Results
                  if (preflightResults != 'None'){
                      $.writeln("Preflight : " + preflightProcess.aggregatedResults[2].length + " error(s) ");
                      for (var i = 0 ; i < preflightProcess.aggregatedResults[2].length ; i++){
                          var preflightError = preflightProcess.aggregatedResults[2][i] ;
                          $.writeln("\n" + i + ".ERR   - " + preflightError[1] + 
                                            "\n" + i + ".PAGE - " + preflightError[2] + 
                                            "\n" + i + ".INFO - " + preflightError[3]
                                            );
                      } 
                 }
              
                 // PDF
                 preflightProcess.saveReport(File(yourDir + "/" + "preflight.pdf"), true);
              
                 // Cleanup
                 preflightProcess.remove();
              
              } catch (ex) {
                 // Exception
              }
              

               

              --

              Manu

              • 4. Re: Accessing errors in Indesign
                xmlapi Level 1

                Thanks, Is it possible to get the actual text frame that was overset USING preflight?

                • 5. Re: Accessing errors in Indesign
                  Emmanuel Brochard Level 1

                  Hi,

                   

                  I do not know. The preflight gives the page with an error. Perhaps, just browse the textframes of the page to detect that which is in overflow.

                   

                  --

                  Manu