@Test
public void setPageContentTest02() throws IOException, DocumentException, InterruptedException {

    String outPdf = DEST_FOLDER + "out2.pdf";
    String testFile = RESOURCE_FOLDER + "in.pdf";
    PdfReader reader = new PdfReader(testFile);
    PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(outPdf));
    int total = reader.getNumberOfPages() + 1;
    for (int i = 1; i < total; i++) {
        byte[] bb = reader.getPageContent(i);
        reader.setPageContent(i, bb);
    }
    reader.removeUnusedObjects();
    stamper.close();
    Assert.assertNull(new CompareTool().compareByContent(outPdf, RESOURCE_FOLDER + "cmp_out2.pdf", DEST_FOLDER, "diff_"));
}