Jump to content
Server Maintenance This Week. ×

help with lp command with do shell script


This topic is 5796 days old. Please don't post here. Open a new topic instead.

Recommended Posts

This applescript works great:

tell application "FileMaker Pro Advanced"

set img_URL to cell "zz__web_ImgPath_CertImg__lct" of current record

do shell script "cd /Applications/Cert_Print; curl -m 1 -fO " & img_URL

end tell

tell application "FileMaker Pro Advanced"

set img_path to cell "zz_local_cert_path" of current record

do shell script "lp" & img_path

end tell

Problem I am having is that I would like the image that is downloaded to be fit to the size of the page when printed. I saw the -o option and fitplot but can't seem to make it work. Any ideas or help would be really appreciated.

Thanks,

Drew

Link to comment
Share on other sites

Great advise Fenton:

Here is the new script

tell application "FileMaker Pro Advanced"

set img_URL to cell "zz__web_ImgPath_CertImg__lct" of current record

do shell script "cd /Applications/Cert_Print; curl -m 1 -fO " & img_URL

end tell

tell application "FileMaker Pro Advanced"

set img_path to cell "zz_local_cert_path" of current record

do shell script "sips --resampleWidth 2250 " & img_path

do shell script "lp -o fitplot " & img_path

end tell

The fitplot is probably not neede at this point but it can't hurt.

Thanks,

Drew

Link to comment
Share on other sites

This topic is 5796 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.