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

Hide a page in a pdf document

Community Beginner ,
Feb 10, 2022 Feb 10, 2022

Copy link to clipboard

Copied

Hi, 

I have created a timetable which links to a lot of fields which then again links to another part of the document. I don't acutally need those fields in my document. They are just for me so that I could write the java script code more easily as I am a complete newbie. So I have put all those fields that are sort of the step in between not needed for any purpose other than link the different java script codes together, on one page. 

Ideally I would like to hide this page from the document as I would only need it in case something is wrong with a code somewhere. So no purpose at all really. Is this possible to do?

TOPICS
Create PDFs , JavaScript , PDF forms

Views

846

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
Community Expert ,
Feb 10, 2022 Feb 10, 2022

Copy link to clipboard

Copied

A better method would be to write the scripts so that the intermediate fields are not needed. But if you feel you really need them, then copy them all to the first page of the PDF and make them "hidden".

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

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
Community Beginner ,
Feb 11, 2022 Feb 11, 2022

Copy link to clipboard

Copied

Unfortunately I am not at all good at java scripting. So I have used basic code which ended up in a few steps in order to achieve what I wanted to achieve. I would have loved to put it all in one code but I don't know how to do that. Will try and have to follow your second idea of hiding the files somewhere. Bit tricky though as its so many. Thank you for your reply anyway.

Votes

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
Community Expert ,
Feb 11, 2022 Feb 11, 2022

Copy link to clipboard

Copied

Any place where the code needs an intermediate value can use a variable for that value. If the value needs to be available to scripts in other fields, then use a document level variable.   

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

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
Community Beginner ,
Feb 11, 2022 Feb 11, 2022

Copy link to clipboard

Copied

Thank you very much for your reply Thom. I have to admit though that I don't understand your answer. I would probably spend weeks if not months studying coding in order to figure this out. 

I understand what you mean with intermediate value (I guess they are the fields I use for my first outcome) but I would't know what to replace them with to be honest. Here a little sample of what I am dealing with.  

 

This is the timetable (Monday to Friday with 7 lessons each day). DD1Mo1 is the drop down box where you select the type of lesson. Then next to it in 1SM22 you can type your planning. This planning I want to appear in the planning document three pages on but 1SM22 needs to be copied into different boxes depending on the value of DD1Mo1.  .....

Screenshot 2022-02-12 at 08.24.43.png

 

So my solution was to create this "fake page". Currently looking like this. 

I have managed to figure out a code that appears in the relevant box depending on which value is selected in DD1Mo1. So if "D" is selected the "value" of 1SM22 is copied into the box DKL122. If "M" is selected it is copied into MKL122 and so on. So each line you see stands for one lesson DKL222 links to the droppdown box DD2Mo1 and so on. Now comes the difficult bit. All the Boxes starting with D... are copied together into the field "Deutsch22".  There is a lot of "if...then" in this and that is what makes it too complicated for me to figure out unfortunately. If you have an idea how I can do this easier (please be kind as I am at complete beginner level) than I would GREATELY appreciate your help as my way is very tidious. 

Screenshot 2022-02-12 at 08.26.55.png

Votes

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
Community Expert ,
Feb 12, 2022 Feb 12, 2022

Copy link to clipboard

Copied

LATEST

You are using the "DK.." fields as intermediate values. Instead you could use a calculation script in "Deutsch22" to collect all the values directly, with out the "DK.." fields. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

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
Community Expert ,
Feb 12, 2022 Feb 12, 2022

Copy link to clipboard

Copied

Votes

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