jimevins / glabels-qt

gLabels Label Designer (Qt/C++)

Home Page:http://glabels.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for printing postage (API integration)

skylarmt opened this issue · comments

It would be amazing if gLabels could support printing postage on labels. This would make it possible to, for example, print shipping labels or pre-addressed, pre-paid postcards using addresses from a spreadsheet.

EasyPost is a good candidate; their API is straightforward and provides regular raster images suitable for printing as-is. They support a ton of different carriers around the world. They even support generating valid U.S. postage "stamps" containing a 2D barcode, suitable for printing directly on an envelope, label, etc.

A good way to implement this would be as an extra properties page for an image object. It would also require some way to specify an API key. A good approach might be to show postage from the API test mode while designing, but before printing to prompt the user if they want to actually purchase postage. The program would then loop over the API [number of copies] times, download the postage images to a temporary location, and use them for printing in the same way a regular image location can be specified by a merge key.