This is a sample Java program showing how to crop a page in Java using Qoppa’s PDF library jPDFProcess. This small snippet shows how to open a PDF, get the first page, set a new crop box and save the cropped PDF to a new file name. // Open PDF file PDFDocument pdfDoc = new […]
Articles Tagged: cropbox
Determine if text search occurrences in a PDF are visible on the displayed page / within the cropbox
As of v2017R1, the text position objects returned when searching text through a PDF document using Qoppa PDF library jPDFProcess (using PDFPage.findText() method), are given in cropbox coordinates (i.e in view or display coordinates when the page is displayed on the screen). For most PDF documents, media box and crop box are the same. But […]