11 Replies Latest reply on Apr 10, 2009 7:23 AM by John Kallios

    (JS) Verify links are updated syntax

    Level 1
      I wondering if anyone has come across this issue and know of a workaround.

      I have two separate scripts. One writes postscript, the other exports to pdf.

      InDesign files located on a server. When running the script, I occasionally get blank pages produced in the pdf. (whether distilled or exported)

      These pages just have a linked placed image. The culprit is working from a server. (or so I believe)

      Has anyone come across this and know of something to add to the script to assure the link is healthy. The link is healthy, I'm hoping to ping the links at the time the script runs to get them to image.

      I'm going to try adding a line to verify the links are good and that where this post leads me. Can someone point me to where to obtain the reference library?

      I'm having a hard time locating it. I also may be missing the obvious in ExtendScript toolkit. I did select InDesign CS4 for the object model data but am ignorant of fully utilizing it as a reference library.
        • 1. Re: (JS) Verify links are updated syntax
          sstanleyau Level 4
          Have you thought of copying the files to a local volume and using them<br />there? I know it sounds a long way around, but the reality is that all the<br />data has to cross the network anyway. I haven't done since a long, long time<br />ago, with QuarkXPress, but in those days it also meant a considerable<br />speed-up of the whole process.<br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au><br />AppleScript Pro Sessions <a href=http://scriptingmatters.com/aspro>
          • 2. Re: (JS) Verify links are updated syntax
            Kasyan Servetsky Level 5
            I use this function to check links status before creating ps-files:
            function checkLinkNormal(){
            
               for(var myCounter = 0; myCounter < myDoc.links.length; myCounter++){
               var myLink = myDoc.links[myCounter];
                  if (myLink.status != LinkStatus.normal){
                     myLink.show();
                     alert ("This link is not OK.");
                     exit();
                  }
               }
            }
            • 3. Re: (JS) Verify links are updated syntax
              Level 1
              Thank you Kasyan. It worked.

              The server is still causing me an issue. Checking the links reduced the problem but it still occurs. Thank you again for the help.

              Shane, unfortunately working on local drives is not an option for this work environment. :(

              I'm sure if I embed the images, image and then undo the embedment it would work. I just don't want to do it.

              If I do this with the manual process, I do not get blank pages.
              • 4. Re: (JS) Verify links are updated syntax
                Level 1
                Hi John,

                It sounds like both the image files and the InDesign file are on the server. This is a problem, because InDesign has to write undo data across the network to the InDesign document backup file that's in the same folder as the original. That's slow. If your display setting is high resolution, then InDesign has to go back to the server and get the high resolution data from the original image file. That's slow.

                If there's no way to move the files (or at least the InDesign file) to the local drive, then you might have to have the script page through the document before doing the export/print process. That should give it time to get all of the data it needs.

                Is transparency (including drop shadows) involved at all?

                Thanks,

                Ole
                • 5. Re: (JS) Verify links are updated syntax
                  Level 1
                  Hi Ole,

                  Very rarely.

                  Transparency and dropshadows can be used within the placed image. Very rarely do we work with live art.

                  Our workflow is to process many of the different supplied formats through InDesign. InDesign then produces my press ready pdf.

                  >then you might have to have the script page through the document before doing the export/print process.

                  How would I do that? My current level: "uninitiated" If it is an involved answer, can you point me to reading material? (and helpful hint what to look up?)

                  Thanks everyone.
                  • 6. Re: (JS) Verify links are updated syntax
                    Level 1
                    Hi John,

                    Something like this (JS):

                    var myDocument = app.documents.item(0);
                    
                    for(var myCounter = 0; myCounter < myDocument.pages.length; myCounter++){
                    app.activeWindow.activePage = myDocument.pages.item(myCounter);
                    }

                    This may or may not work....

                    Thanks,

                    Ole
                    • 7. Re: (JS) Verify links are updated syntax
                      Level 1
                      The good news: The script still works

                      Jury still out news: I will test repeatedly to see if the problem occurs. Intermittent issues are very annoying.
                      • 8. Re: (JS) Verify links are updated syntax
                        Hi John,

                        Can you tell me what version of InDesign you are talking about here, which OS you are running InDesign on and what protocol you are using to connect to the server?

                        Thanks,
                        Stuart
                        • 9. Re: (JS) Verify links are updated syntax
                          Kasyan Servetsky Level 5
                          We keep all our files on the server: InDesign files, graphics, text files – and don’t have any problems because of that. Our designers create files, then proofreaders edit them in InCopy and at last prepress people (like me) color correct images, check files and make pdf-files. So all of us need access to the files and working via network is the only option for us.
                          I know that if a link is missing or modified, it will appear as low resolution image in the final pdf-file – that’s why I included this function into my script. But I never encountered ‘blank pages’ problem.

                          Kasyan
                          • 10. Re: (JS) Verify links are updated syntax
                            Level 1
                            Hi Stuart,

                            OS 10.4.11 on 6 systems and 10.5.x on another 6. (I'll need to double check tomorrow which dot release they are on)

                            Samba protocol. I'll need to verify but I believe we are at 6.0 and will need to apply the 6.0.1 update. I'll have that done tomorrow. If you wish any more information, please let me know.

                            Kasyan,

                            These jobs literally consist of placing an image in page one, another in page two and producing the pdf. No design work and everything is very quick. There is a lot of traffic on the server. (no getting around that)

                            Ole's assessment of the issue seems to be accurate. I did not attempt to set the preference of the temp file to a local drive. I also do this tomorrow. (if the update does not clear it up) Paging through the document helped greatly. Producing postscript has yielded blank pages. Export to pdf created incomplete date for page 2 in a couple instances. Both using the scripts but manually exporting or printing postscript worked fine.

                            I'll report back with more findings.
                            • 11. Re: (JS) Verify links are updated syntax
                              John Kallios Level 2

                              Update:

                               

                              The cause of the blank pages (images not rendering) was due to the document being closed before it rendered the pages.

                               

                              If the document is left opened, the pdf will produce correctly.

                               

                              My logic was flawed to begin with. (and I may have misunderstood Olav as to where I should add the snippet to page through the document) I thought to add processes before exporting the pdf to compensate the delay in communicating with the server.

                               

                              What I did now was move the snippet by Olav to the end of the script. This prevented the document being closed by the user because it did not page through the document until after the export was completed.

                               

                              9 out of 10 have not experienced any blank pages since. The 10th only experienced one and none since then. It makes me believe I should add another or different process at the end to ensure the document cannot be closed until fully rendering.

                               

                              Thanks again for everyone's help. Suggestions for adding or using a different ending process would be greatly appreciated.