Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - How to extract blank pages into a merged PDF doc?
  FAQ FAQ  Forum Search   Register Register  Login Login

Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

How to extract blank pages into a merged PDF doc?

 Post Reply Post Reply
Author
oald View Drop Down
Member
Member


Joined: 16 Sep 2011
Points: 42
Post Options Post Options   Quote oald Quote  Post ReplyReply Direct Link To This Post Topic: How to extract blank pages into a merged PDF doc?
    Posted: 20 Oct 2011 at 9:24am
aandi, thanks for your suggestion, I make it! Your help is really appreciated!
My Product Information:
Acrobat Pro 8.1.6, Windows
Back to Top
aandi View Drop Down
Senior Member
Senior Member


Joined: 07 Jul 2011
Points: 18358
Post Options Post Options   Quote aandi Quote  Post ReplyReply Direct Link To This Post Posted: 12 Oct 2011 at 7:48pm
One thought: you could make a list of the pages to be extracted, then extract ALL pages. Then delete all the pages that are NOT to be extracted from the NEW extracted file, leaving only the (presumed) blanks?  Not entirely sure this can work, not sure if the new file will have the disclosed flag set.
Back to Top
oald View Drop Down
Member
Member


Joined: 16 Sep 2011
Points: 42
Post Options Post Options   Quote oald Quote  Post ReplyReply Direct Link To This Post Posted: 12 Oct 2011 at 5:36pm

I'm developing a tool to extract all blank pages (for this tool, I regard pages without text as blank pages, although there may be other objects in them) or not OCRed pages to a merged PDF, also I want to insert a analysis result page to the first page of the merged PDF. The codes below can create an "Analysis Report" with the first page stating "Pages X,X,X,X... are blank pages.", but I don't know how to the extract the blank pages to the consecutive pages of the "Analysis Report", and how to insert bookmarks "Page X", "Page X" (X means the blank page number in the original document), I check the JS reference and find that there is a method "extractPages", but it can only extract a continuous page range. Can anyone kindly help me? Your help is really appreciated!
  
var blankpages = new Array();
for (var k = 1; k <= this.numPages; k++)
{
    numWords = this.getPageNumWords(k-1);
    if (numWords == 0)
   {
      blankpages.push(k);
    }
}
 
var fileName = this.documentFileName;
if (blankpages.length != 0)
{
    var rep = new Report();
    rep.size = 1.6;
    rep.color = color.blue;
    rep.writeText("Pages " + blankpages + " are blank pages.");
    rep.open("Analysis report of " + fileName);
    app.execMenuItem("ShowHideBookmarks");
}

 
Here is an example file which I want to process:

uploads/151/Test_1.pdf
 
Hers is the analysis report which I want to generate by JavaScript:


Edited by oald - 12 Oct 2011 at 5:41pm
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.047 seconds.