Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Remove blank pages with only page number.

Community Beginner ,
Feb 16, 2025 Feb 16, 2025

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

TOPICS
How to , PDF
67
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2025 Feb 17, 2025
LATEST

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);

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines