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/