Copy link to clipboard
Copied
Hello everyone,
Is there a quick way/function to remove all blank pages that only have page numbers/a maximum number of characters?
This is possible manually and can also be done with documents that do not consist of too many pages. If it is a scanned document, I sometimes come across documents where only the odd pages are blank. Then it is just a matter of plotting only the even pages with Adobe.
The problem is that I also have documents of >500 pages, which contain a lot of blank pages and these are also spread criss-cross through the document.
Doing it manually will take me a while.
Anyone have an idea?
Thanks
Copy link to clipboard
Copied
It's not possible if the pages are scanned, but if they have "real" text then a script can be used to identify the number of words (or characters, although that is more complicated) on the page and remove it if it's below a certain threshold, yes.
For example, this code will remove all pages with 0 or 1 words:
var cnt = 0;
for (var p=this.numPages-1; p>=0; p--) {
var numWords = this.getPageNumWords(p);
if (numWords<2) {
this.deletePages(p, p);
cnt++;
}
}
app.alert("Done. " + cnt + " pages were deleted.",3);