Resizing the pasteboard in quark...
Resizing the pasteboard in quark...
- Subject: Resizing the pasteboard in quark...
- From: Brendan Wilde <email@hidden>
- Date: Fri, 6 Jun 2003 20:51:48 +1000
Sorry this is going to be a long one...
This is part of a script that names and prints single pages from a
multiply page quark doc.
It did work fine in testing but now fails more than it works! It errors
on the placing of the pics but the problem seems to be with resizing
the pasteboard. Sometimes the quark doc will expand the pasteboard
other times it won't and i can't seem to find a reason. Just so you
understand what it does, it adds extra space at the bottom of the page
then pastes a form into the new gap, extends the bleed and prints the
form at the bottom of the page. (another script crops it off again in
acrobat.) quark 4.1, on OS 9.2.2,
Please help, i have spent many a long night getting this far and now it
seems like it might not work!
Thanx!
--sub routine this will increase the bottom of the page to take the info
on set_page_size()
tell application "QuarkXPress 4.11"
tell document 1
get spread height
set spread_height to result
set newspreadheight to (spread_height as integer) + 20
set spread height to newspreadheight
end tell
save of document 1 in file (Temp & s as text)
close document 1
end tell
tell application "Finder"
select file s of folder "Temp for Printing" of startup disk
set file_to_open to selection as alias
end tell
tell application "QuarkXPress 4.11"
open file_to_open use doc prefs yes
end tell
end set_page_size
------------------------------------------------------------------------
-----------------------
on place_masks()
tell application "QuarkXPress 4.11"
activate
tell document 1
try
delete (every generic box whose name is "Mask Box")
end try
--set bounds for the Left Mask box
set aL to "0"
set bL to "-10"
set cL to page height
set dL to 0
--set bounds for the Right Mask box
set aR to 0
set bR to page width
set cR to page height
set dR to (page width as integer) + 10
set horizontal measure to centimeters
set vertical measure to centimeters
--set bleed_page_width to (page width as real) + 10 -- bleed*2 value
tell print setup
ignoring white space and case --needed?
set bleed to 10
--set paper width to bleed_page_width
end ignoring
end tell
--Set bounds for picture box
get page height as integer
set ph to result
set a to ph - 0.1 -- position of the top of the text box down?
set b to "0" -- position of the left hand side from the left
set c to ph + 10 -- position of the bottom of the box from the top
--get page width as integer
set d to 24 --result -- position of width of the box from the left
of the page
--set bounds for the text box
set a1 to ph - 0.1
set b1 to "3.3"
set c1 to ph + 2 + 0.6
set d1 to 18
tell page page_num
--MAKE Left Mask BOX
make picture box at beginning with properties {bounds:{aL, bL, cL,
dL}, color:"white", name:"Mask Box"}
--MAKE rigth Mask BOX
make picture box at beginning with properties {bounds:{aR, bR, cR,
dR}, color:"white", name:"Mask Box"}
--MAKE picture box for logo
make picture box at beginning with properties {bounds:{a, b, c, d},
color:"None", name:"Mask Box"}
tell picture box 1
set image 1 to thelogo
tell image 1
set scale to {"100", "100"}
set offset to {"2 cm", "0 cm"}
end tell
end tell
end tell
--MAKE text box for details
tell page page_num
make text box at beginning with properties {bounds:{a1, b1, c1, d1}}
tell text box 1
set vertical justification to bottom justified
set color to "none"
end tell
end tell
tell story 1 of text box 1 of page page_num --of document 1
--show text box 1
set contents of it to HardDriveName & ": PAP 2: " & current_date
set font to "Helvetica"
set size of story 1 to 8.5
set color to "Black"
set justification to left justified
end tell
tell page page_num
move text box 1 to end
move picture box 1 to end
end tell
end tell
end tell
end place_masks
------------------------------
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.