1 Reply Latest reply on Apr 9, 2008 2:23 AM by (Håvard_Graudo)

    Scripting PDF output on 10.5 gives unpredicable result

      I have a couple of similar scripts that have been running on InDesign CS3 on OS 10.4.
      They have exported thousands of pages for print and are considered tried and tested.

      When moving users to OS 10.5 I sometimes get horrible errors. Most of the time it works, but I can get any of these:

      A random picture missing in the PDF
      Clipping paths ignored on some pictures
      Pictures are upside down (!)

      I am in the early stages of investigation, but I have found this:
      * It only happens when I script the PDF export.
      * It seems to happen at random
      * error rate is low with <1% of the pictures effected
      * errors are not consistent.
      * Pictures are EPS with JPEG encoded data and clipping paths
      * I have only run into this on Intel-boxes

      Has anyone else seen this? InDesign v5.02.


      Here is a boiled down script that will export every open InDesign document. Saved as an app and run from Script panel.
      I removed all the errorchecking so I may have screwed up something as well. This approach has worked flawlessly on OS 10.4.

      property convertSpotToProcess : true

      my main()

      on main()
      tell application "Adobe InDesign CS3"
      set everyExportFormat to name of every PDF export preset
      set alleDok to name of every document
      tell document 1
      set chosenExportFormat to (choose from list everyExportFormat with prompt "Choose output profile")
      if chosenExportFormat = false then error number -128
      set targetfolder to my choosefolder()
      end tell -- docname
      set chosenExportFormat to PDF export preset (chosenExportFormat as text)

      repeat with ggg in alleDok
      set docname to ggg as text

      tell PDF export preferences
      set page range to all pages
      end tell

      set filename to docname
      if filename ends with ".indd" then set filename to text 1 thru -6 of filename
      set filename to filename & ".pdf"
      tell document docname
      if convertSpotToProcess then set convert to process of (every ink whose is process ink is false) to true
      set targetfil to (targetfolder & filename) as string
      with timeout of 40 * 60 seconds
      export format PDF type to targetfil using chosenExportFormat without showing options
      end timeout
      delay 1
      end tell
      end repeat
      say "Your PDFs are ready"
      end tell
      end main

      on choosefolder()
      tell me to activate
      end try
      return (choose folder with prompt "Please choose destination")
      end choosefolder
        • 1. Re: Scripting PDF output on 10.5 gives unpredicable result
          Level 1
          I am updating and correcting my own posting here:

          The errors on output are *not* only on 10.5.
          I got missing images in PDFs from a 10.4 Mac Pro yesterday.
          Prime suspect is currently InDesign 5.02 update.

          Yesterdays job was 12 pages, One layer with 309 pictures. + 10 layers with only text.
          Output was 10 similar 12 page PDFs, with only text different. 6 random pictures was missing on random PDFs

          This is very, very bad. Is anyone reliably exporting PDFs from InDesign 5.02 by [apple] script?