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

Looking for an acrobat script to delete blank pages

Community Expert ,
May 12, 2025 May 12, 2025

I need an acrobat script to delete blank pages. By blank, I mean TRULY blank, with nothing on them.

 

I found this script: but it just looks for pages without text content. So it also ended up deleting pages that had vector graphics on them.

 

for(var i=this.numPages-1;i>=0;i--)
{
  if(this.getPageNumWords(i)==0)
    this.deletePages(i);
}

 

Can anyone help by making this script just apply to truly blank pages? Alternatiely, it would work if it only looked at 11"x17" pages and deleted the blank ones.

TOPICS
JavaScript
193
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
1 ACCEPTED SOLUTION
Community Expert ,
May 12, 2025 May 12, 2025

This is a bit off topic, but it might be helpful to others. There is a preflight fixup that can remove empty pages, it can be added to an Acrobat Action.

remove empty pages.png

View solution in original post

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 ,
May 12, 2025 May 12, 2025

This is a bit off topic, but it might be helpful to others. There is a preflight fixup that can remove empty pages, it can be added to an Acrobat Action.

remove empty pages.png

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 ,
May 12, 2025 May 12, 2025

What does empty mean? Or blank?

A page can have no words and but be filled with graphics, on an image of words.  Or it can just be a bad scan of a blank page, which will look like a graphic to any software. 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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 ,
May 12, 2025 May 12, 2025

That's perfect! Just what I was looking for. I tried to embed that into an action, but I can't find "Remove empty pages" in the dropdown.

 

Is it hiding somehwere else?

Screenshot 2025-05-12 at 1.40.24 PM.png

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 ,
May 12, 2025 May 12, 2025
LATEST

This dropdown menu only displays profiles, not fixups.

You must first create a new (custom) profile using the "Remove Empty Page" fixup for it to be available in this menu.

 

Capture_2505122254.png

 

Capture_2505122252.png


Acrobate du PDF, InDesigner et Photoshopographe
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