Crop Stamps.com PDF label

I am working on the transition from Endicia to Stamps.com for my e-commerce store. For top-notch international labels, Stamps.com currently forces the label to be in PDF format in a standard 8x11 size document. This prevents the label from printing directly to the Zebra printer (as we currently do).

What I want to do is take the existing pdf file that will be returned, crop the size to 4 "x6", which contains the actual label and save / print. Ideally, this will be done in PHP or cli through a system call with PHP.

Any libraries, features or other suggestions will be appreciated.

+5
source share
4 answers

you can try pdfbox: http://pdfbox.apache.org/ the library has nice features for extracting media / cropping, creating new PDF files and printing. A.

+1
source

In the latest API release, Stamps.com addresses this specific issue in order to be able to return a 4x6 PNG tag rather than a 4x6 tag inside an 8x11 page.

Complete the latest release of the printLayout API (v24) with the Normal6x4CN2 parameter or similar.

That should work. But I can not get it to work correctly. :-)

+1
source

PDF- . "-" / "" .

() PHP PDF, , PDF , .

0

You can try striPDF . It automatically removes white margins from PDF files.

0
source

All Articles