3 Replies Latest reply on Nov 2, 2016 3:29 AM by Laubender

    packageForPrint --- problem when packaging all open documents - ADOBE please read

    Digital Production Level 1

      When looping through all open documents in InDesign and using the function "packageForPrint" with the include PDF flag set to true I noticed that all open documents package correctly except for the PDF that gets created. The PDF for all documents ends up being made from whatever document is the activeDocument. This seems like a bug with the method "packageForPrint". Can anyone (including Adobe) confirm this bug? Does anyone have a solution? Thank you.

        • 1. Re: packageForPrint --- problem when packaging all open documents - ADOBE please read
          Laubender Adobe Community Professional & MVP

          Hi,

          I can confirm this.

          Just tested with InDesign CC 2015.4 v.11.4.1.102 on Mac OSX 10.10.5.

           

          Workaround (also tested):

          In your loop define the active document the one you are accessing in the loop.

           

          var docs = app.documents.everyItem().getElements();
          
          for(var n=0;n<docs.length;n++)
          {
              // Workaround:
              // Make the current doc the active one
              app.activeDocument = docs[n];
              // Then package:
              docs[n].packageForPrint(/*include all necessary arguments*/);
          }
          

           

          What is your version of InDesign and your OS ?

           

          Regards,
          Uwe

           

          // EDIT: Added OS version of my test system

          • 2. Re: packageForPrint --- problem when packaging all open documents - ADOBE please read
            Laubender Adobe Community Professional & MVP

            And I discovered another odd thing or at least an inconsistent behavior with file naming:

             

            If you export more than one time to the same folder and you included IDML and PDF
            every time new files are written and old IDML or PDF files are not overwritten.

             

            Like that:

             

            Name.indd

             

            Name.pdf

            Name1.pdf

            Name2.pdf

            Name3.pdf

             

            Name.idml

            Name1.idml

            Name2.idml

            Name3.idml

             

            Wheras the packaged InDesign document is not overwritten.

            Also the packaged font files and the packaged image files are overwritten ( or not packaged again, I cannot tell the difference ).

             

            Note 1:

            1. If we want to overwrite all the files, no problem.
            Just check, if the path (folder) in argument "to" of the method exists and wipe off all IDML and PDF files there.

             

            2. If we want not to overwrite the InDesign document, also no problem:

            Also check, if the path (folder) in argument "to" of the method exists and rename all the InDesign document files found.

             

            Note 2:
            Something that I am missing with method packageForPrint() is an argument (or option) the user interface is providing:

            "Use Document Hyphenation Exceptions Only"

             

            Regards,
            Uwe

            • 3. Re: packageForPrint --- problem when packaging all open documents - ADOBE please read
              Laubender Adobe Community Professional & MVP

              I just reported this bug.
              Tested with inDesign CC 2014.2 and 2015.4 on Mac OSX 10.10.5.


              You should report it here:

              Wishform - Adobe InDesign

               

              Regards,
              Uwe