This question is an exact duplicate of:
- iText 5.5.11 - bold text looks blurry after using PdfCleanUpProcessor 1 answer
I'm using iText 5.5.8 to remove some text in a rectangle in my PDF, exactly following this example. E.g. the code snippet like below:
final Rectangle rect = new Rectangle(0, 12, 300, 21);
final PdfReader reader = new PdfReader(inputPDF);
final PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(outputPDF));
for (int i=1;i<=reader.getNumberOfPages();i++) {
cleanUpLocations.add(new PdfCleanUpLocation(i, rect, BaseColor.WHITE));
}
PdfCleanUpProcessor cleaner = new PdfCleanUpProcessor(cleanUpLocations, stamper);
cleaner.cleanUp();
stamper.close();
reader.close();
However, in the output file, all those bold texts weight becomes heavier, and looks blurry. Meanwhile, all normal texts are still same as original.
Does anyone know how to fix this problem?