Skip to main content
Participant
June 28, 2024
Answered

unable to edit page properties in pdf page thumbnail

  • June 28, 2024
  • 3 replies
  • 1157 views

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.

This topic has been closed for replies.
Correct answer try67

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

}

3 replies

Participant
July 2, 2024

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...

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
July 2, 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

}

Participant
July 3, 2024

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;");}

PDF Automation Station
Community Expert
Community Expert
June 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.

try67
Community Expert
Community Expert
June 28, 2024

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.

try67
Community Expert
Community Expert
June 28, 2024

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.