4 Replies Latest reply on Jun 29, 2010 1:35 AM by low Jackson

    Placing a PDF in CS5 – was working in CS4!

    low Jackson



      Below is an extract from a script that places a PDF in to a frame on a page, it was working in CS4 but it has broke in CS5. It all works up to the placing of the PDF – The error message reads Error: -1708 Error String "insert:File path to the PDF" doesn't understand the place message.

      Heres the script…

      tell active document
                     –make layers
                     set myLayer to make layer with properties {name:"impo-PDF", layer color:red, visible:true}
                 end tell
                 repeat with x from 1 to pageCountPDF
                     set myPage to page x of active document
                     –set the pdf import options
                     set page number of PDF place preferences to x
                     set PDF crop of PDF place preferences to crop media
                     set transparent background of PDF place preferences to false
                     – start placing the PDF
                     – set frame size
                     set lhboxBounds to {0, 0, 312, 111}
                     tell myPage
                         set myRectangle to make rectangle with properties {geometric bounds:lhboxBounds, fill color:"None", stroke color:"None", stroke weight:0}
                         –Rotate pdf ?
                         set myPlacedPDF1 to place thePDF with properties {rotation angle:myPDFrotation + 90} on myRectangle
                         set myPlacedPDF1 to item 1 of myPlacedPDF1
                         –re-position PDF within frame
                         fit myRectangle given center content
                         – dupe up frame
                         move (duplicate myRectangle) by {111, 0}
                         move (duplicate myRectangle) by {222, 0}
                         move (duplicate myRectangle) by {333, 0}
                     end tell

      Any help would be great as I can't find anything on this


      many thanks