Pdf content is not rendering correctly after redaction applied using itext5
<p>I am using following code.</p>

<pre><code>public class RemoveContentInRectangle {
public static final String SRC = "resources/pdfs/pdffile.pdf";
public static final String DEST = "resources/pdfs/pdfnew.pdf";

public static void main(String[] args) throws IOException, DocumentException {
    File file = new File(SRC);
    file.getParentFile().mkdirs();
    new RemoveContentInRectangle().manipulatePdf(SRC, DEST);
}

public void manipulatePdf(String src, String dest) throws IOException, DocumentException {
    PdfReader reader = new PdfReader(src);
    PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(dest));
    List&lt;PdfCleanUpLocation&gt; cleanUpLocations = new ArrayList&lt;PdfCleanUpLocation&gt;();
    for(int i=1; i&lt;= reader.getNumberOfPages(); i++){
        Rectangle rect = new Rectangle(144.98572f, 655.74976f, 257.91428f, 670.322f);
        cleanUpLocations.add(new PdfCleanUpLocation(i, rect, BaseColor.GRAY));          
    }
    try{            
        PdfCleanUpProcessor cleaner = new PdfCleanUpProcessor(cleanUpLocations, stamper);
        cleaner.cleanUp();
    } catch(Exception e){
        e.printStackTrace();
    }

    stamper.close();
    reader.close();
}    

}
</code></pre>

<p>I am getting missing text in output pdf file. Please see screenshots.</p>

<p><a href="http://i.stack.imgur.com/eLAKQ.jpg" rel="nofollow">original pdf file screenshot.</a></p>

<p><a href="http://i.stack.imgur.com/FEd48.jpg" rel="nofollow">output pdf file screenshot. </a></p>

<p>redacted area is with gray rectangle and characters are missing from all over the document.</p>

<p>How could i resolve this issue?</p>