Removing filled out form pages from a PDF and putting them into a new PDF file using Javascript

New Here ,
May 18, 2022 May 18, 2022

Copy link to clipboard

Copied

Hello,

 

I am unsure as to the capabilities of Acrobat Pro DC but from some sites that I have read it seems possible to implement this kind of functionality. Can any experienced users please advise if the following is possible using javascript from within a document.

 

I have a 350 page PDF that is a form. Customers can fill out any number of pages and so leave potentially hundreds of pages blank. I need a javascript that will scan through each page and find if any form elements have values and if so take the page and create a new file where they will all go. That way only the relevant pages will be extracted into a new file. 

I have come across links like this but since my programming knowledge is limited I'm not sure if this applicable to my scenario.

 

https://stackoverflow.com/questions/22118231/identify-and-extract-or-delete-pages-of-a-pdf-based-on-...

 

Any help or advice is appreciated and thanks in advance.

TOPICS
Create PDFs , JavaScript , PDF forms

Views

54

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
May 18, 2022 May 18, 2022

Copy link to clipboard

Copied

Delete all not filled pages and save the file with a new name.

Likes

Translate

Translate

Report

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
New Here ,
May 18, 2022 May 18, 2022

Copy link to clipboard

Copied

Ok thanks, any direction on how to achieve this?

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
May 18, 2022 May 18, 2022

Copy link to clipboard

Copied

LATEST

Compare the values of the fields with the default values. When the values are equal the field was not filled.

The property page of a field gives you the page or pages of the field.

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
May 18, 2022 May 18, 2022

Copy link to clipboard

Copied

Acrobat Reader does not allow the creation of a new document.


It allows deleting pages, but only if they were spawned from a (hidden) template page, it doesn't work with "normal/static" pages.

Which might be complicated to do for a 350 pages document (but not impossible).

Likes

Translate

Translate

Report

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