Print script

I am working on printing a folder of PDF files directly to a printer without having to go through Preview or Acrobat or others

i have found thast both

lpr -p and lp -d work the same

is there a benefit of one over the other?

and

secondly

is there any way to scale the output to fit the page ( say like 92%)?

set myPrinter to “imagePASS-C1_Print”
set myfolder to “Macintosh HD:Users:jbradfield:Desktop: test printscript:”
set myFiles to list folder myfolder without invisibles
repeat with x from 1 to count myFiles
set thisPath to POSIX path of file (myfolder & (item x of myFiles) as string)
should return /Users/SomeUser/Desktop/Jobs/afile.pdf
set theShell to "lpr -p " & myPrinter & " " & thisPath
try
do shell script theShell
optionally log success here
on error err
or, if there was a problem log that or send it to someone
end try
end repeat

this script was automatically tagged for
color coded syntax by Script to Markup Code
written by Jonathan Nathan

Any help or insight would be great

I know also that i can do this through Acrobat or others but i noticed that the shell script seems so much faster i thought it would be nice to take advantage of this speed

Hello Joe,

Please let me know if you have got a solution to scale the window to say 80% and print . I am looking for a script which does the same.

There’s no feature in lpr to scale images. You need to use SIPS or Image events first then pass it to lpr.

I am looking out for an apple script to do this. There is a print command in apple script which prints the window which appears on the front. The print command opens the Print setting dialog. I need to set the Scaling option defaulted to 80% and print . The nornal scaling option is present in the page set up.
Let me know if there is a solution for this.

I have also being trying the print a bunch of PDFs, only to a imagePASS-M1. I’m trying to get my script to change the saved print settings according to agruments within the PDF itself. I can’t find a way to change the printer chosen or the settings. Any help or insight would be great. As far as using the terminal, I know nothing of how to use it and am now in the process of trying to find out.

Many thanks, Sling.