@Test
public void shrinkContentNoBoxes() throws IOException, TaskIOException {

    try (PDDocument document = PDFParser.parse(SeekableSources
            .inMemorySeekableSourceFrom(getClass().getClassLoader().getResourceAsStream("pdf/one_page.pdf")))) {
        PdfScaler scaler = new PdfScaler(ScaleType.CONTENT);
        scaler.scale(document, 0.5);
        PDPage page = document.getPage(0);
        assertEquals(new PDRectangle(0, 0, 595, 842), page.getMediaBox());
        assertEquals(new PDRectangle(0, 0, 595, 842), page.getCropBox());
        assertEquals(new PDRectangle(148.75f, 210.5f, 297.5f, 421f), page.getArtBox());
        assertEquals(new PDRectangle(148.75f, 210.5f, 297.5f, 421f), page.getBleedBox());
        assertEquals(new PDRectangle(148.75f, 210.5f, 297.5f, 421f), page.getTrimBox());
    }
}