Take the 2-minute tour ×

I have a PDF with a CropBox size of 6" wide x 9" high. I need to add it to a standard letter-sized PDF. If I change the CropBox size, then the cropmarks become visible. So ideally what I'd like to do is crop out just the visible portion of the page, then pad the sides so that the total height and width is letter-sized.

Is this possible using PDFBox or another Java class?

share|improve this question
In addition to changing the crop box, you can prepend the content streams of each page with a cliiping path along the current crop box border. –  mkl May 20 '13 at 10:00
@mkl which class would I be using here? Is that something under PDPage? –  Jordan Reiter May 20 '13 at 19:28
grin That's why I made it a comment, not an answer. I know that prepending a clipping path would be a solution PDF-wise but I'm not too knowledgeable concerning PDFBox and, therefore, cannot easily say how to do that in PDFBox. –  mkl May 20 '13 at 20:39
add comment

Your Answer



Browse other questions tagged or ask your own question.