PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) General questions / FAQ Stop displaying dynamic data when user saves the document

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #26836

    I’m using pd4ml 3.8fx3 version to convert html files to pdf file. I have a form field in the pdf which will automatically display 1st date of the current month every time pdf is Opened.
    I Used the below method to assign javascript which assigns date whenever pdf is opened.
    public void addDocumentActionHandler( String actionType, String javaScript );

    pd4ml.addDocumentActionHandler(“OpenAction”, javaScriptString);

    Now we want to stop displaying the dynamic date when user saves the pdf.

    Question :
    Do we have any action type defined when user saves the pdf? for Opening a file we have “OpenAction” Similarly is there any action type defined when user Saves the pdf?

    #29303

    The first parameter (actionType) of the method accepts the following values:
    “OpenAction”,
    “DC” (document close),
    “WS” (will save),
    “DS” (did save),
    “WP” (will print)
    “DP” (did print)

    Obviously you are interested in “WS”. However, I suspect, it is going to be tricky to implement the needed functionality with it (or I overcomplicate the things).

    You still may try to implement the feature with “OpenAction”. Just compare the document creation date and last modification date (if any and if possible), and display the last modification date if it is greater than the creation date.

    #29304

    Hi, Thanks for the information. However i tried using “WS” (will save) and
    “DS” (did save) option nothing worked. Below is the peace of code used to check the functionality.

    pd4ml.addDocumentActionHandler(“WS”, “this.getField(‘i1′).value =’kkkk’;”);
    pd4ml.addDocumentActionHandler(“DS”, “this.getField(‘i1′).value =’datasaved’;”);

    When i tried saving pdf using file -> SaveasCopy menu option the form field is not populated with neither of the above mentioned values.

    PLease let me know how can i accomplish this.

    #29305

    Do you use Acrobat Reader or Acrobat to save PDFs?

    #29306

    I use Adobe reader 9.5 version

    #29307

    I am afraid, Reader cannot save edited copies of PDF. Well, it can save annotations to PDF, but collected PDF form data can be only exported as FDF. Please correct me if I am wrong.

    #29308

    Hi, We are not editing the PDF. We have created a form field in html and after converting html to pdf we are populating the form field with first date of the current month dynamically using javascript when ever pdf is opened. This is working fine.

    If user saves the pdf document we want the form field to be populate with the date when pdf is saved .

    In simple terms we want the pdf form field to populate dynamic date when ever pdf is opened and till the pdf is saved locally .

    Plz correct me if my approach is wrong.

    #29309

    Hi,
    Please provide your response on my earlier approach ? If my approach is not correct please let me know how can i implement this.

    #29310

    We need 1-2 days to learn/reproduce PDF-saving specific issues. I’ll let you know.

    #29311

    Please let me if there are any updates on this issue.

    #29312

    I created an HTML with 3 text input fields: t1, t2 and t3.

    [language=xml:rrtngbnu]

    Hockey is among the
    oldest
    Olympic
    sports, having made its first appearance at the 1908 London Games.





    [/language:rrtngbnu]

    Added 3 PD4ML API calls:

    [language=java:rrtngbnu]pd4ml.addDocumentActionHandler(“OpenAction”, “this.getField('t1').value ='OpenAction'; app.alert('OpenAction');”);
    pd4ml.addDocumentActionHandler(“WS”, “this.getField('t2').value ='WS'; app.alert('WS');”);
    pd4ml.addDocumentActionHandler(“DS”, “this.getField('t3').value ='DS'; app.alert('DS');”);[/language:rrtngbnu]

    Result of a saving of the document is predictable: only t1 and t2 fields are filled. See attached.

    However it is some strange: both WS and DS alerts are popped up after I pressed Save of a SaveFile dialog.

    #29313

    HI, thanks for the reply.
    I’m using adobe reader . I have downloaded temp64.pdf and when i open this i see only t1 and t2 fields are filled along with openaction alert. After this i tried saving the temp64.pdf by clicking file -> Save a copy option. i didn’t get any of “WS” or “DS” alert. but i got an alert “Save a blank copy of this Form” . After clicking save a blank copy the pdf copy is saved but with the same information.

    Please let me know if we can work this on adobe reader. If not what is the alternative.

    #29314

    Hi,
    I’m waiting for reply. Request you top please provide your response.

Viewing 13 posts - 1 through 13 (of 13 total)

The forum ‘General questions / FAQ’ is closed to new topics and replies.