Interactive pdf file based on filtered information, is it possible?

Community Beginner ,
Jan 03, 2020

Copy link to clipboard

Copied

Hi everyone,

 

I work for an Apprenticeship provider in the UK and I am trying to move away from printing too many documents to digital ones.

 

We have something called a start pack with repetitive information like start date, learner name, employer…However, each start pack have a few different pages such as standards, learner journey depending on what apprenticeship the learner undertakes. To make it even more complicated, the learner journey is different if the company is a big corporation or an SME and if the learner is from 16-18 years old or older learners.

 

I have managed to create different fillable forms where I only have to fill in the name once and other fields of the same info automatically filled in and the dates as well based on a calculation (for i.e Business Admin end date is 15 months from start date). I name them along the line of Business Admin-young learners-Levy or Business Admin-existing employee-nonlevy. So imagine that I have like 15 files for one apprenticeship and we are doing like 5 apprenticeships altogether and in 2020 we are planning to provide more standards.

 

Now I want to go a step further to make it more user-friendly (I know which form to use, but the coaches won’t. So now I still have to fill in the information and print it out for them).  Ideally, only if I can just put all the information I have in one big pdf file and the first page is the information and as I filter the information, corresponding pages are visible only, which sounds very impossible for me. That’s why I think of the 2nd option:

 

Preferably, I want to have one page with checkboxes or combobox where they pick the programme (business admin, management, procurement…) and the type of company (levy company, non-levy company) and the age of the learner (existing employee or young learners) and a button. When people click the button, it will open the corresponding form that I already made.

 

Can you tell me what kind of code I need to put behind the button for this to work? Thank you everyone in advance.

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

Both things are possible, but the former is more complicated, especially if the file is not used exclusively in Acrobat.

The latter basically just requires an if-else hierarchy to determine which file to open, so it's easier.

You need to use something like this (this is pseudo-code):

if (FieldA=="1" && FieldB=="3" && FieldC=="5") OPEN FILE X.pdf;

else if (FieldA=="1" && FieldB=="2" && FieldC=="5") OPEN FILE Y.pdf;

else if (FieldA=="3" && FieldB=="3" && FieldC=="3") OPEN FILE Z.pdf;

etc.

TOPICS
Acrobat SDK and JavaScript, Create PDFs, How to, PDF forms

Views

350

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

Interactive pdf file based on filtered information, is it possible?

Community Beginner ,
Jan 03, 2020

Copy link to clipboard

Copied

Hi everyone,

 

I work for an Apprenticeship provider in the UK and I am trying to move away from printing too many documents to digital ones.

 

We have something called a start pack with repetitive information like start date, learner name, employer…However, each start pack have a few different pages such as standards, learner journey depending on what apprenticeship the learner undertakes. To make it even more complicated, the learner journey is different if the company is a big corporation or an SME and if the learner is from 16-18 years old or older learners.

 

I have managed to create different fillable forms where I only have to fill in the name once and other fields of the same info automatically filled in and the dates as well based on a calculation (for i.e Business Admin end date is 15 months from start date). I name them along the line of Business Admin-young learners-Levy or Business Admin-existing employee-nonlevy. So imagine that I have like 15 files for one apprenticeship and we are doing like 5 apprenticeships altogether and in 2020 we are planning to provide more standards.

 

Now I want to go a step further to make it more user-friendly (I know which form to use, but the coaches won’t. So now I still have to fill in the information and print it out for them).  Ideally, only if I can just put all the information I have in one big pdf file and the first page is the information and as I filter the information, corresponding pages are visible only, which sounds very impossible for me. That’s why I think of the 2nd option:

 

Preferably, I want to have one page with checkboxes or combobox where they pick the programme (business admin, management, procurement…) and the type of company (levy company, non-levy company) and the age of the learner (existing employee or young learners) and a button. When people click the button, it will open the corresponding form that I already made.

 

Can you tell me what kind of code I need to put behind the button for this to work? Thank you everyone in advance.

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

Both things are possible, but the former is more complicated, especially if the file is not used exclusively in Acrobat.

The latter basically just requires an if-else hierarchy to determine which file to open, so it's easier.

You need to use something like this (this is pseudo-code):

if (FieldA=="1" && FieldB=="3" && FieldC=="5") OPEN FILE X.pdf;

else if (FieldA=="1" && FieldB=="2" && FieldC=="5") OPEN FILE Y.pdf;

else if (FieldA=="3" && FieldB=="3" && FieldC=="3") OPEN FILE Z.pdf;

etc.

TOPICS
Acrobat SDK and JavaScript, Create PDFs, How to, PDF forms

Views

351

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
Jan 03, 2020 0
Most Valuable Participant ,
Jan 03, 2020

Copy link to clipboard

Copied

Both things are possible, but the former is more complicated, especially if the file is not used exclusively in Acrobat.

The latter basically just requires an if-else hierarchy to determine which file to open, so it's easier.

You need to use something like this (this is pseudo-code):

if (FieldA=="1" && FieldB=="3" && FieldC=="5") OPEN FILE X.pdf;

else if (FieldA=="1" && FieldB=="2" && FieldC=="5") OPEN FILE Y.pdf;

else if (FieldA=="3" && FieldB=="3" && FieldC=="3") OPEN FILE Z.pdf;

etc.

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
Reply
Loading...
Jan 03, 2020 1
Community Beginner ,
Jan 03, 2020

Copy link to clipboard

Copied

Hi try67,

 

Everyone in the office has Acrobat but only a few people have the Pro version. I made it so it can be saved and signed by learner and coach and then send to employer to sign. Now I print the pack out, the coaches do the signups and I have to scan everything back in, which takes lots of time. That's why I want to introduce everyone to the interactive one to reduce the amount of papers we use and also to save myself time.

 

Do you mind giving me a rough idea about the first option to see if it's worth pursuing? I am not very very good at coding (what you explained to me I can do, to give you a rough idea) but I also see this as a sort of challenge and I just can't get it off of my mind.

 

Thanks

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
Reply
Loading...
Jan 03, 2020 0
Most Valuable Participant ,
Jan 03, 2020

Copy link to clipboard

Copied

Do you mean they have Acrobat Standard, or are you talking about Acrobat Reader (the free version)? Because it will only work with the former. The latter will require a much more complex solution.

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
Reply
Loading...
Jan 03, 2020 0
Community Beginner ,
Jan 03, 2020

Copy link to clipboard

Copied

The free version I am afraid. Oh well, the button should do for now. Thanks for your support 🙂

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
Reply
Loading...
Jan 03, 2020 1