Re: printing droplet
Re: printing droplet
- Subject: Re: printing droplet
- From: "Kabbes, Dan-DLI" <email@hidden>
- Date: Fri, 12 Jul 2002 12:20:16 -0400
I have had a need for a similar script, but chose Quark to do the work. It
is pretty simple, but will place any graphic that Quark can handle in a
picture box, and either size it proportionally (if it won't fit) or keep it
100% it it fits. If it won't fit, it also will rotate the graphic 90
degrees to see if that will make it fit better. (I never got around to
changing it back if that did not improve how well it fit.)It also creates a
small text box, reporting what the reduction % was. There are also some
notes produced to remind the artist to note any special seperation needs.
Caution - sloppy, but it works
on open thePicture
tell application "QuarkXPress"
activate
make new document at beginning with properties {page height:"11\"",
page width:"8.5\""}
tell document 1
make picture box at beginning with properties
{bounds:{"0.493\"", "0.3\"", "9.5\"", "7.75\""}}
set image 1 of picture box 1 to thePicture
tell picture box 1
set the bounds of image 1 to proportional fit
set picScale to the the scale of image 1 as list
set hScale to (item 1 of picScale as real) div 1 * 1
if hScale < 100 then
set the angle of image 1 to "900"
end if
set the bounds of image 1 to proportional fit
set picScale to the the scale of image 1 as list
end tell
end tell
end tell
set hScale to (item 1 of picScale as real) div 1 * 1
set vScale to (item 2 of picScale as real) div 1 * 1
if hScale > 100 or vScale > 100 then
tell application "QuarkXPress"
activate
tell document 1
set the scale of image 1 to {"100%", "100%"}
set hScale to 100
end tell
end tell
end if
tell application "QuarkXPress"
activate
tell document 1
make text box at beginning with properties {bounds:{"9.5\"",
"6.5\"", "10\"", "8.007\""}}
make new text at paragraph 1 of text box 1 with properties
{contents:"This picture is scaled to " & hScale & "%", size:12,
font:"Helvetica"}
set the color of the text of text box 1 to "Registration"
set the view scale to fit page in window
make text box at beginning with properties {bounds:{"9.5\"",
"3.9\"", "10\"", "6.469\""}}
make new text at paragraph 1 of text box 1 with properties
{contents:"OUR COPY", size:32, font:"Helvetica"}
set the justification of paragraph 1 of text box 1 to centered
set the color of the text of text box 1 to "Registration"
make text box at beginning with properties {bounds:{"9\"",
".5\"", "10.5\"", "4\""}}
make new text at paragraph 1 of text box 1 with properties
{contents:"Composition" & return, size:14, font:"Helvetica"}
--set the justification of paragraph 1 of text box 1 to left
make new text at paragraph 2 of text box 1 with properties
{contents:"Print this" & return & return, size:14, font:"Helvetica"}
--make new paragraph at end
make new text at paragraph 3 of text box 1 with properties
{contents:"Separation as " & return, size:14, font:"Helvetica"}
-- new paragraph at end
make new text at paragraph 4 of text box 1 with properties
{contents:"This is not the actual ink color", size:14, font:"Helvetica"}
set the justification of paragraph 1 of text box 1 to centered
set the color of the text of text box 1 to "Registration"
set the bounds of image 1 to centered
tell print setup
set halftone screen to 105
--set registration marks to center
end tell
print
end tell
end tell
end open
--
>
From: Jairav Desai <email@hidden>
>
Date: Sat, 13 Jul 2002 11:29:17 +0200
>
To: email@hidden
>
Subject: printing droplet
>
>
I want to create an applescript droplet that accepts Postscript or PDF
>
files and prints them (without asking any questions). This came about
>
as a result of Print Center in Mac OS X not letting you drag and drop a
>
file into the printing queue.
>
>
can anyone help me out here? Because it seems that there are no
>
libraries in Print Center or Preview that tall a printer to print a
>
certain document.
>
>
any help would be greatly appreciated.
>
>
thanks
>
>
-Jairav Desai
_______________________________________________
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.