8 Replies Latest reply on Apr 4, 2008 4:15 PM by (Robert_Tkaczyk)

    I have an issue with a script that places multiple page PDF files...

      I'm using a version of "PlaceMultipagePDF.jsx" that I modified to use Media Box when placing the PDF file pages.

      That part was easy and works perfectly.

      The issue I'm having it that every time it places a PDF page, InDesign pops up a dialog saying that it's Importing pages from "file" and Creating preview with a progress bar. This dialog pops up once for each page, and the UI time it takes to do this is slowing down the import.

      So is there any way to turn off this feedback dialog?

      Note: I still need to see the dialogs to choose the PDF file and pick the document and page to start placing. I just want the one that displays for each page to not display...
        • 1. Re: I have an issue with a script that places multiple page PDF files...
          Level 1
          from VB:

          Function Place(FileName As String, [ShowingOptions As Boolean = False])
          Member of InDesign.PDF
          Places the file. / Return value: The placed file. as Array of PageItems, Graphics, Movies, Sounds, Stories or Texts / FileName: The file to place / ShowingOptions: Whether to display the import options dialog


          robin

          --
          www.adobescripts.com
          • 2. Re: I have an issue with a script that places multiple page PDF files...
            Level 1
            Robin,

            It's not showing the import options dialog, but the feedback that it's creating a preview. That is flashing and slowing down InDesign. This really slows it down on Vista with the Aero interface enabled.

            I've already got the import options disabled.

            How do I disable the creating preview dialog?

            Or any InDesign UI updates until the script is finished?

            What some would call a quiet mode...

            What I'm dealing with is a total overall document size between 25,000
            and 150,000 pages of PDF file to process through InDesign. And yes I do break it up into 1,200 to 4,000 page documents.
            • 3. Re: I have an issue with a script that places multiple page PDF files...
              Level 1
              I've made small test now - my tool (MakeCatalog) placed 380 pages from various PDF's in 2 minutes
              pdfs are placed to fast to see what is on pages ;)
              placed pdfs - documentation from adobe
              computer - Q6600 2400@2800, 8GB RAM, Vista 64bit EN

              what type of Display Performance you have set ??

              Display Performance:
              - Fast Display
              - High Quality Display
              - Typical Display

              I have TYPICAL ... maybe you have set HIGH QUALITY ??

              robin

              --
              www.adobescripts.com
              • 4. Re: I have an issue with a script that places multiple page PDF files...
                Level 1
                Robin,

                Image quality of the preview does not seem to be the issue.

                Dell T7400, Quad Xeon 3Gig, 4Gig Windows Vista 32 Bit.
                SCSI Raid drive, almost 300MB per second...

                All files local.
                Areo Appearance enabled...

                Import 100 Pages

                High Q = 15 Sec
                Typical Q = 50 Sec
                Fast Q = 48 Sec

                As you can see, High Q is faster then Typical or Low. This seems wrong since Fast doesn't even make one at all...

                Import 900 Pages

                High Q = 6 Min 5 Sec

                Classic Appearance enabled...

                Import 100 Pages

                High Q = 13 Sec
                Typical Q = 49 Sec
                Fast Q = 54 Sec

                Import 900 Pages

                High Q = 5 Min 15 Sec

                Note: The files import speed is not linear. The larger the import the slower the becomes...
                • 5. Re: I have an issue with a script that places multiple page PDF files...
                  Level 1
                  I found this in the Developer KB.

                  But I can't find any of the functions in the Scripting Ref...

                  How To: Suppress the progress bar when processing a command.

                  Summary
                  You can suppress progress bar display by turning it off before processing the command.

                  Issue
                  I use the IImportFileCmdData interface and pass kSuppressUI (do not display any UI) as UIFlags. When processing the command, I get a progress bar, which is called "Adobe InDesign Tagged Text Import Filter", whereas I expect no UI.

                  Solution
                  To suppress progress bars you should explicitly turn them off before you process the command (or commands).

                  1. Get the interface IProgressBarManager (it's on kAppBoss, which you can get from gSession).
                  2. Use IProgressBarManager::SuppressProgressBarDisplay() to turn off the progress bars.
                  3 .Process the place command(s).
                  4. Turn the progress bars back on when you're done.

                  In InDesign 2.x and above, you can also use the SuppressProgressBarDisplay class (ProgressBar.h) class to achieve this. In order to use this class you just need to create an instance of the class on the stack as shown here:
                  SuppressProgressBarDisplay suppress(kFalse);
                  • 6. Re: I have an issue with a script that places multiple page PDF files...
                    Level 1
                    this is for Plugins :(

                    robin

                    --
                    www.adobescripts.com
                    • 7. Re: I have an issue with a script that places multiple page PDF files...
                      Level 1
                      So I assume this function does not exist in Scripts...

                      The darn progress bar seems to be the major problem. It's too bad there wasn't some other method of importing a multi-page PDF file.

                      I'm really stuck here, as I process over 1 Million PDF pages a year at least, maybe more then that...
                      • 8. Re: I have an issue with a script that places multiple page PDF files...
                        Level 1
                        maybe try to find another way ... try to play with building your own INX ?? or maybe XML will help you ??

                        wait ... you say that you import 100 pages in 15 secs ?? this is not so bad - 2x faster than me ;) maybe this is max what your computer can do ?? ;)

                        ... one more idea ... test your script with MINIMIZED InDesign window ;)
                        I tested this solution long time ago - and indesign work 30% faster ;)
                        in VB6 I can minimize InDesign manually (before script start) or send system message to minimize whole application ...

                        I don't know if you can do something like this from JS - but you can minimize document's window (VB6 example):

                        call myindi.activewindow.minimize
                        ...
                        call myindi.activewindow.maximize

                        robin

                        --
                        www.adobescripts.com