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

Using one master PDF to fill out and save multiple different PDF's

New Here ,
Mar 23, 2018 Mar 23, 2018

Copy link to clipboard

Copied

Hello everyone!

I apologize in advanced if this has been done before but it is not the easiest thing to google! Also I'm not sure if this should be under JavaScript or a different forum so I'm sorry if this is the wrong place to ask!

Let me briefly explain what I'm doing first.

I work for as a contractor and twice every year my company goes out and does preventive maintenance (PM) on a large amount of traffic camera's and message signs. What I have set up in the field is a master PDF file for each type of device we PM that I'll open with a Laptop or iPad and enter in the state's district number, the ID of the site (CAM-09-001 etc..), the date is was done, the PM cycle number, and a long list of drop down boxes that declare the working order or condition of the things we check at each site (cabinet condition, visibility due to trees/obstructions, etc..). They're all a simple "Excellent, Good, Fair, Poor" drop-down list for the conditions fields and the other fields are just a simple fillable text field like the date or device ID. Now currently, I use this master list and fill everything out for a site and save it as "PM Form - sitenamehere" where the master PDF is named "PM Form - CCTV's" or similar. I now have essentially 2 copies where one will be submitted or forwarded to the bosses and one (the master) that I will fill out again for the next item. The problem is that it will already be filled out with the previous items' entries; which is mildly annoying and - albeit small - a waste of time to change when time is essential!

I'm looking to make the process of editing and saving my completed form more streamlined and quicker! What would be ideal would be that when I open the master, the Date auto fills, my district stays the same unless changed last time it was opened (same for pm cycle and a few other fields as we'll do a full districts' items before moving to another district), and all the drop-down lists get defaulted back to say "Excellent". Then when I go to save the completed form, it flattens it (so they cannot be edited and when all sites are down I can easily combine them into one GIANT PDF that will be kept and also sent in), and automatically tries to save it as "PM Form - sitenamehere". Rinse and repeat.

I understand leaving the input fields' properties as default will cause them to keep whichever the last input was the next time I open it (pm cycle, district #, etc..) as well as the drop-downs though I can assign a default value for each of those (defaulting to "Excellent" and only changing if something is wrong). As for the date, I figured out a way to automatically fill it out to the date it is opened and formatted to m/d/yy with a document JavaScript:

var f = this.getField("Date");

if (!f.value) f.value = util.printd ("m/d/yy", new Date());

My questions, I guess, are:

  1. Will the newly saved PDF also try to auto fill the date to when IT is opened or will it keep what was originally saved (if it is flattened when saved this shouldn't be an issue I'd assume)?
  2. Will the Master PDF set all fields back to default after I save the completed form? Would I have to close it first then re-open it? Would there be a way to default everything even just after saving as a different file name?
  3. Is there an easy way to save a completed Master as flattened like the Save As keyboard shortcut Ctrl+Shift+S lets me save as a different name?
  4. Can I have my completed Master PDF automatically try to save its copy as a specified filename that has text pulled from a filled out input box? (ex: my Camera ID field is entered as "CAM-09-001", is there a way to have it try to save the file as "PM Form - CAM-09-001.pdf" with JavaScript or something similar?

Or if someone has a simpler way or an alternative to ANY of these, I would love to hear it. I like learning new things.

I am fairly new at Acrobat and don't know much JavaScript but have worked with code, and this is one of the first times I've been tasked with creating a functional PDF form since we made the transition from paper, so again.. I apologize if what I've asked comes off as trivial or even impractical. I'm just looking for some advice!

Sorry for the wall of text!

I'm currently using Adobe Acrobat Pro 11 and Windows 10.

Thank you so much for your time,

-Lance R.

TOPICS
Acrobat SDK and JavaScript , Windows

Views

125

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
LEGEND ,
Mar 24, 2018 Mar 24, 2018

Copy link to clipboard

Copied

LATEST

You can transfer field values between Acrobat forms created with Acrobat by exporting and importing FDF files. One could also use global variables but the use of this approach eats up a lot of memory. Then one can open more than PDF form, make sure each has a unique object name, and copy the values from one form field in one form to another form field in the other form.

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