I would like to scan a PDF using Apache PDFBox 2.x for elements with white background color and change these elements to have transparent background or to remove the elements' background settings at all.
The reason for this is to make the PDF overlayable over another PDF (using PDFBox merger utility). Within this process, regions with elements with explicit white background of the overlaying pdf should not wipe out the contents of the other (overlayed) pdf.
White background cannot be seen when printing a pdf on a white sheet of paper, so in many cases it does not make sense to use explicit white background at all. Regions with backgrounds in other colors, however, should remain their background color.
I've found this article about font colors in PDF's, but it deals only with stroke colors, not with background filling colors.
https://stackoverflow.com/a/38392128/5295284
Many thanx in advance!
Tombo