I'm working on converting from Endicia to Stamps.com for my ecommerce store. For first-class international labels, Stamps.com currently forces the label to be in PDF format in a standard 8x11 size document. This prevents the label from being printed directly to a Zebra printer (as we currently do).
What I'm looking to do is take the existing pdf that is returned, crop the size to the 4"x6" area that contains the actual label and save/print. Ideally this will be done either in PHP or cli via system call from PHP.
Any libraries, functions, or other suggestions will be appreciated.
With an online postage service like Stamps.com, you can easily print all USPS shipping labels from the comfort of your home. Stamps.com provides access to all USPS mail classes including First Class Package Service, Parcel Select and Priority Mail.
you could try pdfbox: http://pdfbox.apache.org/ library has nice functions for media/crop box extraction, creating new pdfs and printing.
In the last API release Stamps.com address this particular problem to be able to return 4"x6" PNG label not the 4x6 label inside 8x11 page.
Checkout latest API release (v24) printLayout property with Normal6x4CN2 option or similar.
This should work. But I can't still bring it to work correctly myself. :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With