Issue redacting pdf with wathermark

Product: Java Library

Product Version: 9.2.0


I am doing an analysis of several Java libraries to do redacting in pdfs. PDFTron has given me very good results except in two cases:

  • If I have to cross out a word in a digital signature, it is removed

  • If the document has a watermark in the center of the pages, all the rectangles added in the document are replicated in the watermark.

What is the reason for this? Is there a solution?

P.S. In this analysis I receive from another library the areas where I can do redacting with PDFTRon, for which I only receive the rectangles to hide.


Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


Thank you for your interest in PDFTron! Just to get a better understanding of your issues, are you able to provide us with some example files that demonstrate the two issues you highlighted? Please provide original and redacted files for comparison.

Thank you.


I attach here a pdf with watermark and the result after redacting with PDFTron.

Original (84.7 KB)
Redaction (110.9 KB)

Here is the code:

 Redactor.Redaction[] rarr = new Redactor.Redaction[cleanUpLocations.size()]; 
 Redactor.Appearance app = new Redactor.Appearance();    
 app.redactionOverlay = true;
 app.border = false; 
 app.showRedactedContentRegions = false;
 Color color = cleanUpLocations.get(0).getColor();
 app.positiveOverlayColor = new ColorPt(color.getRed(), color.getGreen(), color.getBlue());

 for(int regionNum = 0; regionNum < cleanUpLocations.size(); regionNum++) {
            RegionPDFBoxDTO region = cleanUpLocations.get(regionNum);
            rarr[regionNum] = new Redactor.Redaction(region.getNumPage(), 
                                                    new Rect(region.getX(), region.getY(), region.getX() + region.getWidth(), region.getY() + region.getHeight()), 
Redactor.redact(pdfDocument, rarr, app, false, false); 

Thank you for the files. This issue has been resolved in the upcoming version of the SDK which is set to release soon. I will provide you with a link to the download once it has become available.

Please let me know if you have any further questions in the meantime.

Perfect!! Very thanks you!!

To get notified for the next official SDK release you can join our Discourse Announcements channel.

1 Like