assertTrue(pdf.length > 200);
assertEquals("%PDF-1.4", new String(copyOfRange(pdf, 0, 8), "UTF-8"));
assertEquals("%%EOF\n", new String(copyOfRange(pdf, pdf.length - 6, pdf.length), "UTF-8"));
// Load
PDDocument loadDoc = PDDocument.loadNonSeq(new ByteArrayInputStream(pdf), new RandomAccessBuffer());
assertEquals(1, loadDoc.getNumberOfPages());
loadDoc.close();
}