BufferedImage bim3 = ImageIO.read(new File(tiffG3Path));
checkIdent(bim3, ximage3.getRGBImage());
PDPage page = new PDPage(PDPage.PAGE_SIZE_A4);
document.addPage(page);
PDPageContentStream contentStream = new PDPageContentStream(document, page, true, false);
contentStream.drawXObject(ximage3, 0, 0, ximage3.getWidth(), ximage3.getHeight());
contentStream.close();
reader = new RandomAccessFile(new File(tiffG4Path), "r");
PDXObjectImage ximage4 = new PDCcitt(document, reader);
validate(ximage4, 1, 344, 287, "tiff", PDDeviceGray.NAME);