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

unable to edit page properties in pdf page thumbnail

New Here ,
Jun 27, 2024 Jun 27, 2024

Copy link to clipboard

Copied

Hello. I found that the "page properties" in PDF page thumbnail is prohibited to edit.

I want to insert a auto "current date" in a pdf document, so I follow the guideline shown in the below link to do it.

https://kb.uwec.edu/articles/pdf-forms-inserting-an-automatic-date-field

However, since I cannot edit the page properties, the inserted "current date" can't auto update. Could you please help advise how to enable the "page properties" editing? Thank you.

TOPICS
General troubleshooting , How to , JavaScript , PDF

Views

180

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

correct answers 2 Correct answers

Enthusiast , Jun 28, 2024 Jun 28, 2024

Did you right-click the page, or did you activate the options menu pictured in the top left of your pages panel without having a page selected?  If you want the date to update whenever the document is opened, a document level script would be better than a page action script.

Votes

Translate

Translate
Community Expert , Jul 02, 2024 Jul 02, 2024

If you set the Signature field to lock all fields when signed it should prevent the script from editing the field, but an error message might appear. Alternatively, you can change the code to check if the field is signed before changing the text field's value. Something like this:

 

if (this.getField("Signature1").value=="") {

// rest of code

}

Votes

Translate

Translate
Community Expert ,
Jun 28, 2024 Jun 28, 2024

Copy link to clipboard

Copied

That's odd, but you shouldn't use the Page Open event for that, anyway. Place the code as a doc-level script, via Document JavaScripts, under Tools - JavaScript.

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
Enthusiast ,
Jun 28, 2024 Jun 28, 2024

Copy link to clipboard

Copied

Did you right-click the page, or did you activate the options menu pictured in the top left of your pages panel without having a page selected?  If you want the date to update whenever the document is opened, a document level script would be better than a page action script.

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 ,
Jun 28, 2024 Jun 28, 2024

Copy link to clipboard

Copied

Good point. It seems from the screenshot they clicked the Options button in the Pages panel. This command only becomes available in that popup menu if a page (or multiple pages) has been selected first.

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
New Here ,
Jul 01, 2024 Jul 01, 2024

Copy link to clipboard

Copied

Thank you very much. It works now.

I have one more question. If I added the signature field in the same document, I want to set all fields as "not to update any more" including the date after signed, how can I reach that? Since the date is set to be auto-updated every day (by placing the code as a doc-level script), that has caused another problem I just mentioned. Even the document has been signed, the date still keep updating every day. Does anyone have better idea? I am worrying about I have asked a stupid question...

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 ,
Jul 02, 2024 Jul 02, 2024

Copy link to clipboard

Copied

If you set the Signature field to lock all fields when signed it should prevent the script from editing the field, but an error message might appear. Alternatively, you can change the code to check if the field is signed before changing the text field's value. Something like this:

 

if (this.getField("Signature1").value=="") {

// rest of code

}

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
New Here ,
Jul 02, 2024 Jul 02, 2024

Copy link to clipboard

Copied

LATEST

Thank you.

I tried to replaced the follwoing code and it did work. Great.

 

var f = this.getField("Today");
var signatureField = this.getField("Signature");
if (!signatureField.value) {
f.value = util.printd("yyyy-mm-dd", new Date());}
else {
f.setAction("Calculate", "event.rc = false;");}

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