Skip to main content
March 25, 2016
Answered

How I could delete a page with a specific attribute ?

  • March 25, 2016
  • 2 replies
  • 749 views

Hello.

I would like to know if it's possible to delete a group of a page in pdf which contains a specific property.

The main pdf contains more than 100 pages. On a few pages, there is a text property like "DoNotPrint".

At first I've tried to convert in XML this pdf, to gain a parent / child structure... and if I detect the attribute in a child node I could delete the parent node (and then the entire page).

But this pdf is full of graphicals diagrams... so this solution will not work.

That's why I'm trying to work directly on the pdf.

Could you tell me if it's possible ? I see that it's possible to delete a range of page, but could I do that with my condition ?

Thanks a lot !

This topic has been closed for replies.
Correct answer gkaiseril

Yes. There are only a few items added with the Professional version dealing with JavaScript. First is the access by the JavaScript editor to the document level JavaScript and the PDF optimizer that can perform batch processing including JavaScript on multiple PDF files.

2 replies

Legend
March 27, 2016

I think you need to define very precisely what you mean by an "attribute". If you can't define it in terms of the PDF standard, how would you see it or set it in the interface?

March 28, 2016

I've tried at home with a trial version of Acrobat Reader Pro DC, a sample script and a sample document. It's works very well.

Now I have to try with the real document... but my company have only Acrobat XI Standard, could I use javascript with this version ?

Thanks you very much

gkaiserilCorrect answer
Inspiring
March 28, 2016

Yes. There are only a few items added with the Professional version dealing with JavaScript. First is the access by the JavaScript editor to the document level JavaScript and the PDF optimizer that can perform batch processing including JavaScript on multiple PDF files.

Inspiring
March 25, 2016

If this is one PDF you could search for the words and then manually delete the pages.

It is also possible to use JavaScript to read each word on each page and identify the pages with the words and then use JavaScript to delete the specific pages.