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

How to use multiple copies of the same form combined in one file

Explorer ,
Jan 06, 2025 Jan 06, 2025

I use a test pit form that has many fields.   When I am done with a project I want all of these forms say 2 to 10 depending on the project to be in the same pdf file.   I do not want to ge through each fiel and change each field to blahblah page 2 and then page 3 etc.   If i don't do this and combine they are all identical.   So I have been flatening.   This is an extremely irritating process that must have a work around.   flattening each page separately with a new name and then combining the files wastes so much time say bad things to my computer (that I would not want to repeat here).   There must be another way.

 

Of course I am using Acrobat Pro and probably in the wrong forum.   I can't wait to hear that.

TOPICS
Create PDFs , How to , PDF forms
2.2K
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 ,
Jan 06, 2025 Jan 06, 2025

Are you referring to a form field that says page 1 of 10, 2 of 10, etc.?

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
Explorer ,
Jan 07, 2025 Jan 07, 2025

Every form field has a name.   If you are using multiple copies of the same file, when they are combined they sync.   So it the first line 20th line of each page has a form field titled test pit 3, then all of the pages will have identical contents in the field called test pit 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
Community Expert ,
Jan 06, 2025 Jan 06, 2025

You can flatten an entire file at all once using the Preflight tool, or this simple script:

this.flattenPages();

You can even use an Action and run this command on multiple files in a single process.

Just be aware this change is not reversible, so make sure you keep backup copies of your files, in case you want to edit them later on.

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 ,
Jan 07, 2025 Jan 07, 2025

You could even automate the entire process so that the files are flattened and combined in a single action. 

 

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
Explorer ,
Jan 07, 2025 Jan 07, 2025

Better yet, combining simultaneously.

I am an advanced programmer.  For example I know

10 Hi

20 Goto 10

I have even heard that there is a way to do this such that it fills the entire row and then proceeds to line 20.   I'm sure you understand that I am prepared to write a script on nothing more than a concept.   No, sadly I am just a civil engineer attempting to use multiple copies of the same form with different information on each form.   

 

I will tell you this, when I discovered this initially, after entering all of the test pit data for multiple pits, combining and then discovering all the sheets were identical (with no backup)  I may have said a bad word.   That's not nice.  Any additional help and you could be looking at aquiring another correct answer.

 

Jim

 

By the way, the comments are all helpful and I thank you for your time replying.   We are very close to a solution, just a bit more explanation how this is done and I can toss my potty mouth soap bar.   

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
Explorer ,
Jan 07, 2025 Jan 07, 2025

This is precisely what I do, but with each page, of course saving each one with a different name.  My experiene is that the fields continue to be editable (with the edit command) even after flatening.    I thought this odd as well.

 

How, praytell, do you flatten multiple pages simultaneously?

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 ,
Jan 07, 2025 Jan 07, 2025

You flatten multiple files at once with the Action Wizard.  "fields continue to be editable (with the edit command)" - Do you mean the flattened text is editable?  It will be because Acrobat is a PDF editor.  If you want to prevent this you need to apply encryption (password protection).

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
Explorer ,
Jan 07, 2025 Jan 07, 2025

i suppose if i become desperate I can consult with chatgpt and ask her to write a script for me.   The internet said she is super smart.

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 ,
Jan 07, 2025 Jan 07, 2025

I've already given you the script you need, but good luck with ChatGPT...

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
Explorer ,
Jan 07, 2025 Jan 07, 2025

Ok, so this is the script I have been using.   The action wizard will be intuitive enough to know how to use this script to combine multiple pages in one file while also flatening simultaneously?  This is precisely what I want to do.   You may be in the running for the correct answer, plus you endured my unrelated comments and said nothing, except for ChatGPT.  We will refer to that as growing pains.   I don't think it will have any impact on awarding the "correct answer".  Of course I will need to know if this works.  I'm sure it does, you are a sharp member of the community.

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 ,
Jan 07, 2025 Jan 07, 2025

The Action will not combine your files for you. It is just used to flatten them.

You will still need to combine them yourself, manually, after it is done processing them.

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 ,
Jan 07, 2025 Jan 07, 2025
LATEST

Just to be clear. If someone has access to the data file and can see the data, then there is no way, in any format, that data can be protected from being changed.  It's simply not possible.  You can create higher bars, like converting text data to a raster image, but that just makes it harder, it doesn't stop anyone from makeing changes. 

 

There is however a way to guarantee data integrity , i.e., that any changes can be detected. Use a digital certificate to sign the data. 

 

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 ,
Jan 07, 2025 Jan 07, 2025

The code I provided will flatten the entire file, converting all form fields and comments to static contents, not just individual pages from it. If you create an Action that executes that code and then saves the file, you could run it on multiple files in a single process. That can be done via Tools - Action Wizard.

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
Explorer ,
Jan 07, 2025 Jan 07, 2025

of course that static content, for example text, will continue to be editable with acro pro?   I use control J enter the script and save the file with an F at the end so I know which files are flattened.   Someone said to make this uneditalbe you must add a password.   I do that from time to time with my reports when i want to ensure someone will not change (more like modify and use on another similiar project - but that's irrelevant).

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 ,
Jan 07, 2025 Jan 07, 2025

Yes, it could still be edited in Acrobat, just like anything else in the file.

If you really want to prevent editing (or at least, be able to prove if the file was edited) then digitally sign it. Password protection is not very safe at all, unfortunately.

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
Explorer ,
Jan 07, 2025 Jan 07, 2025

Thank you for that information.   I did not know that encrypting is not a reliable way of protecting this data from being modified.   Is there a way to reliably ensure that the data can't be modified.    I know that nothing is 100%.   I am referring to someting that will stop most, not anyone with an unlimited budget and single life goal, modify my report.

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 ,
Jan 07, 2025 Jan 07, 2025

Like I said, a digital signature, as well as a file-open password are your best chance of doing it.

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
Explorer ,
Jan 07, 2025 Jan 07, 2025

How is it that I can create a form in word, then use acro pro to confert to a form add fields and complete.   I don't believe all of the content that was created in word, the part of the form that supports form fields is generally not editable.   Why is this but something we are trying to secure can be edited even after flatening or passoword protecting?

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 ,
Jan 07, 2025 Jan 07, 2025

Not sure what you mean... If you have Acrobat then you can edit everything in a PDF, unless the file is protected.

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