Skip to content
Station in the Metro
Menu
  • Voiceover & Voice Acting
  • CV
  • The Optical Podcast
  • Apps and Scripts
    • Crop PDF Shipping Labels
    • Django Internal Links
    • Django MultiRangeField
    • FeedPress Subscribers Status Board Graph Panel
    • Post Atomic Horror Unofficial Episode Guide
    • Markdown Cheat Sheet
    • Proper English Title Caps 2 for iTunes
    • Clean Ripped TV Episodes for iTunes
    • Track Name Clean Parts for iTunes
  • Casio PT-7
    • Photo Galleries
    • Operation Manual
    • Keyboard ribbon cable repair
  • Colophon
Menu
Example USPS Shipping Label

Crop PDF Shipping Labels

These macOS-based scripts take an existing PDF with too much white space, and try to crop it to the smallest amount of space, checking that the result should be a roughly 4×6\" shipping label. If the cropped label is the correct size, it will then automatically print it on a 4×6 label printer.

This works great for PDF labels from Poshmark, for which this was originally designed. It might also work well for other 4×6\" shipping and return labels that you might get from various online stores. Let me know how it goes!

The script is not smart about the crop at all; it just strips out all of the white space around the edges of the PDF. If there is stuff other than the label in the PDF (text instructions, etc.), it will not crop precisely to the label. If the attempt at a crop doean't come out at a roughly 4×6\" size, instead of printing, it will open the PDF in Preview.app for further manual intervention.

Warning: there's a fair amount of terminal jiggery-pokery to get it set up. Check out the readme for the details:

https://github.com/swizzlevixen/useful-scripts/blob/main/crop-and-print-label/

Mark Boszko

Film & Video Editor, Voiceover Artist, macOS IT Engineer, and Maker

© 2025 Mark Boszko | find Mark elsewhere on the internet