Sunday 15 June 2014

java - Removing white-space from a pdf using PDFBox -


I'm calling Fedex API to generate a shipping label. The API returns a byte array, then I By typing in a PDF:

  files.write (paths.get ("xyz.pdf"), imgbits); // IMGbits I have feedback from the FedEx API  

However, when I open the file, I think the actual label is only 2/3 wide by width and 1/2 at the height Is the reason for the whole PDF because of which I am getting a lot of white space in PDF.

Can this white space be extracted in any way by using the PDF box? Or is it possible to remove white space when saving the byte array in a PDF file?

Thank you.


No comments:

Post a Comment