Please give advice on how to remove blank pdf pages that have been scanned? I am using java and apache pdfbox. I planned to compare blank and filled pages by size, but I do not know how to determine the size of the PDPage object in bytes.
Asked
Active
Viewed 282 times
0
-
You could render the PDF to images and then save this image. https://stackoverflow.com/questions/23326562/ However this is not a perfect method. In some rare cases, a seemingly small page can have a small content, e.g. a stamp. One solution would be to make an additional manual check. – Tilman Hausherr Feb 28 '20 at 07:41
-
Also, the size thing only works nicely for b/w scans. So render to b/w images and save these. – Tilman Hausherr Feb 28 '20 at 07:42
-
Thanks, Tilman Hausherr. Your answer from another question also helped me a lot. – Aliaksei Biazverkhi Mar 03 '20 at 08:56