Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

help with lp command with do shell script

Featured Replies

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

You could resize the image, using the sips command.

  • Author

I found a little more documentation that might help related to fit plot

"This feature depends upon an accurate size in the print file. If no size is given in the file, the page may be scaled incorrectly!"

  • Author

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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.