print PDF file

I’m a newbie trying to solve this can someone help me with this??
This is my script:

do shell script "screencapture ~/Desktop/file.pdf"
tell application "Finder"
	print file "file.pdf"
end tell

What it does is taking a screencapture and trying to print that. It works but I don’t know what to do when the print dialog appears. It should click the Print button automatically and then close the file.

I don’t think this is a big problem but don’t know how to solve it.
Greetings Zeb

P.s. How can I choose to print page 2 only

I don’t know if this will help. While trying out scripting some Illustrator CS printing stuff the Ill guide had an example as such:

print current document without dialog

Don’t know if this works outside of Illustrator but you might give it a try.:confused:

Tried it but didn’t work I can’t combine it with the script I have

If you tell the Acrobat to open this instead and then you can use

print pages with shrink to fit and binary output

. This will make acrobat print the document without giving you the print dialog. You could then expand on this and just tell it to only print page 2. Give it a go.:slight_smile: