Adobe LiveCycle preview PDF

brianw81860517 11-05-2016

Form fields update correctly when viewing in livecycle but not when opened in adobe x pro.  Specifically two field I have.  One for the current date and one for the current time.  When I view them in the PDF viewer in Livecycle everything works fine.  But when I open the document in Adobe X Pro or Adobe Reader XI, both fields display the date and time from when it was saved last in Livecycle...how do I make it work the way it does in the PDF viewer??

Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)

Answers (7)

Answers (7)

radzmar
MVP
17-05-2016

This wouldn't make sense, because then the field will be reset everytime you reopen the form.

Then you can also use the script:

$.rawValue=num2date(date (), "MMMM DD, YYYY")

brianw81860517 11-05-2016

Can't I force this field to zero out with FormCalc formulas when the document is opened?  Something like this:

$.rawValue=null then

if($.isNull) then

$.rawValue=num2date(date (), "MMMM DD, YYYY")

endif

endif

brianw81860517 11-05-2016

It still only reflects the date that it was saved in Livecycle.  It's not clearing that field.  And I have no idea why...  Also, if I can get this working with the JS Debugger, will this work for anyone who opens the form?  Or would this Debugger script need to be placed on every PC?

radzmar
MVP
11-05-2016

The return value in the console is null, so the field has been cleared (it also should be cleared in the form as well). Now Reader-enable your form. Next time you open in you should get the current date.

brianw81860517 11-05-2016

I did exactly as you said...and nothing seems to be happening.

This is my LC field:

934942_pastedImage_0.png

And here is the Java Debugger field.  Debugger is acting strange though.  I cannot make the window any larger than it is and when I attempt to initialize it nothing happens.  And the same script will show up in debugger windows on other documents...

934952_pastedImage_1.png

radzmar
MVP
11-05-2016

This behavior is correct, because once saved, the fields aren't empty anymore so the script doesn't fire again.

To solve this problem see this thead: Re: Reader extension

brianw81860517 11-05-2016

This is what I'm using with formCalc:

if(F.P1.DateTimeField1.isNull)then

F.P1.DateTimeField1.rawValue=num2Date(Date(), "MMMM DD, YYYY")

endif

Seems really simple and works without issue in the PDF viewer...