0 Replies Latest reply on Jul 7, 2008 11:17 AM by ksnielsen

    [AS CS3] Printing PostScript

    ksnielsen
      Hi-

      I am trying to set the postscript printing settings within the script rather
      than relying on the user to have there print style set correctly. I am
      having trouble with the paper height and paper width settings. It errors
      saying it expected a number or string. As far as I can tell I am giving it
      a number.

      When I was using a print style, I was able to set the paper height and paper
      width just fine.

      Any ideas?

      --
      Karen Nielsen
      R&D Specialist
      1101 Frontage Rd NW
      Byron, MN 55920
      Ksnielsen@schmidt.com

      tell application "Adobe InDesign CS3"
      tell front document
      set ruler origin of view preferences to page origin
      set zero point to {0, 0}
      set DocProps to bounds of page 1
      set myPageHeight to item 3 of DocProps as real
      set myPageWidth to item 4 of DocProps as real
      set PaperHeight to (myPageHeight + 0.25) as real
      set PaperWidth to (myPageWidth + 0.25) as real

      End tell
      set theStyle to make printer preset with properties {name:"Karen", use
      document bleed to print:false, bleed top:0.125, bleed bottom:0.125, bleed
      inside:0.125, bleed outside:0.125, color output:composite leave unchanged,
      page position:centered, flattener preset name:"[High Resolution]", print
      layers:visible layers, print page orientation:portrait, download PPD
      fonts:true, PostScript level:level 3, mark offset:0.125, crop marks:true,
      font downloading:complete, OPI image replacement:false, scale height:100,
      scale width:100, send image data:all image data}
      tell document 1
      tell print preferences
      set active printer preset to theStyle
      set printer to postscript file
      set print file to (PrinergyFolder & myJobNumFinal & "_"
      & VerCode & ".ps") as Unicode text
      set page range to (item i of myPageList as string)
      set paper size to custom
      set paper height to PaperHeight
      set paper width to PaperWidth
      set data format to binary
      end tell
      print without print dialog
      end tell
      End tell