in

Quark Forums

round value for papar width

Last post 10-22-2009 9:29 AM by arunkumar. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 10-22-2009 9:29 AM

    round value for papar width

    HI
    Any can resovle this problem
    Actually i need to print page in spreads,
    1. While running the below script the paper width is set decimal value as e.g 409.999 not as 410, Even though i set round function to paper width.
    2. When i assign page width as integer its show value that less that 2mm, e.g if Trim is 200 then output spread shows 398 not as 400.

    tell application "QuarkXPress"
        activate
        if not (exists (document 1)) then
            display dialog "No document open, exit!" buttons {"OK"} default button "OK"
            return
        end if
      
        tell document 1
            set DocName to name as text
            set FilePath to "Users:macuser:Desktop:PDF:In:" & DocName & ".ps"
            set pagewidth to page width as real
            set horizontal measure to millimeters
            set vertical measure to millimeters
        end tell
        tell print setup of document 1
            set registration marks to centered
            set registration marks offset to "6 pt"
            set spreads to true
            set printer type to "AdobePDF 7.0"
            set paper size to "Custom"
            set paper width to round ((pagewidth * 2) + 6)
            set orientation to portrait
            set page position to center horizontal
            set resolution to 2400
            set reduce or enlarge to "100%"
            set print quality to normal
            set data format to binary data
        end tell
        print document 1 PostScript file {FilePath}
    end tell

    Cheers
    Arun Kumar

Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems