Skip navigation
Currently Being Moderated

Invoice created.  How to edit once and then lock it from being edited?

Nov 20, 2008 8:59 AM

Hello,
I just started using LiveCycle the other day when I purchased CS4.

I created a custom invoice for my billing using text fields and numeric fields. This works fine and it looks good.

When I create a PDF from LiveCycle it has the fields that I can input my amounts into, text, and so forth.

How do I, once I edit the PDF lock it so that the clients I am sending the invoice to, can not edit it but only print it? I see this functionality only within LiveCycle itself, requiring a password to edit, however I would prefer to just edit the PDF myself (since I am the only one doing the billing) and then just lock it somehow rather than putting in a password each time.

Any ideas? I couldn't seem to find what I wanted here or in the help files.

Thanks
 
Replies
  • Currently Being Moderated
    Nov 21, 2008 12:22 AM   in reply to (Neil_Johnson)
    You can do this by using the signature field and in the Object > Signature tab there is a check box called "Lock Fields After Signing". I don't know how to do this outside of the signature though.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 24, 2008 10:24 AM   in reply to (Neil_Johnson)
    There is code you can write to lock down all objects on the form. If you post your email address I will send you a sample.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 24, 2008 8:45 PM   in reply to (Neil_Johnson)
    Hi Paul! my email id would be ajay.yada@gmail.com, can u send me the smaple...??
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 25, 2008 5:44 AM   in reply to (Neil_Johnson)
    Just sent it
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 5, 2008 6:38 AM   in reply to (Neil_Johnson)
    Paul,

    I would very much appreciate this sample code, if possible. Thanks.
    dfulmer AT cox DOT net
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 5, 2008 7:47 AM   in reply to (Neil_Johnson)
    Just sent it
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 5, 2008 8:30 AM   in reply to (Neil_Johnson)
    Hi Paul,

    Sample for me too?

    lucpiccard@hotmail.com

    thank you
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 5, 2008 9:39 AM   in reply to (Neil_Johnson)
    Just sent it
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 5, 2008 6:05 PM   in reply to (Neil_Johnson)
    A related topic. I've been using a script that Paul provided that, among other things, makes all the fields read-only on a contract-type document when the receiver opens the docuemnt to prevent changes to the field values. Recently, an unscruplulous customer used Acrobat to modfy the text-portions of the document and changed the terms of the deal without informing us that they had done so. Since folks were relying on a pdf as a "secure" document that would be difficult to edit, the contract changes weren't caught until the last minute. The customer indicated it was deliberately an attempt to make changes they hoped we'd not catch. So . . .

    Is there a way after setting the fields to read-only when the receiver opens the document to programmaticlaly lock the entire document so all the receiver can do is print it out?

    We "fired" the customer . . . .
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 8, 2008 5:31 AM   in reply to (Neil_Johnson)
    You can use a digital signature to lock down the document. The signature will create a hache value of the form and it will be compared ech time the doc is opened. If a change to the doc is made (unscrupulously) then the signature will be invalid and you will know that the doc has been tampered with. You can even compare the two docs to find out where the change was made.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 8, 2008 11:39 AM   in reply to (Neil_Johnson)
    Thanks. I'll have to "play" with digital signature to see how that works.

    It's a jungle out there . . . .
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 10, 2008 6:32 AM   in reply to (Neil_Johnson)
    Hello Paul, can you send me a sample too?
    info@erkwerk.nl
    Thanks in advance
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 10, 2008 7:18 AM   in reply to (Neil_Johnson)
    Just sent it
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 10, 2008 10:40 AM   in reply to (Neil_Johnson)
    Hi Paul,

    I have a similar need. Could you send the code to desaipr@dslextreme.com

    TIA.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 10, 2008 11:18 AM   in reply to (Neil_Johnson)
    Just sent it
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2008 6:39 AM   in reply to (Neil_Johnson)
    here to, ted.goodridge at realpage dot com
    Thanks Paul
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2008 7:02 AM   in reply to (Neil_Johnson)
    Just sent it
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2008 9:33 AM   in reply to (Neil_Johnson)
    Could you post the code here?
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2008 10:11 AM   in reply to (Neil_Johnson)
    It would not make sense out of context unless you were intimate with the XFA object model.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2008 7:11 AM   in reply to (Neil_Johnson)
    b Circling back on messages 9 and 10.

    I've spent some time reading up on digital signatures and I'm still not sure how to implement, or whether it can do what I'm looking for it to do. We have a form that is completed by a sales person taking an order using Reader. After the form is completed, I used Paul's script on a button click event to change all the form fields to "read-only" and to clean up some formatting. The sales person can then save the form through Reader extensions and can email it to the customer. Whne the form is opened, Paul's script runs again on the doc:ready initialize event to present the form to the customer in the read-only version, which the customer can then print, sign and return to us (the finance folks say we've got have the paper copy -- :-(). Unfortunately we've now had instances where a customer will open the form in Acrobat (not Reader) and edit the text portions of form, and those edits are not easily seen.

    What I've like to do is, as part of the button click event, have the some function available, so that, if I understand the digital signature function correctly, if the customer edits the form using Acrobat, some sort of warning is visible on the document so when we receive the printed form back, we know it's been altered.

    If I can make the paper version work, I think I can move folks to the next step of e-sig and paperless forms over the Web, but I've got to restore trust in pdf as a secure medium first. I don't want to go back to Word forms (Yuck!) which some folks think are more secure after this incident.

    Thanks for everyone's thoughts and help.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2008 3:11 PM   in reply to (Neil_Johnson)
    If you never need to modify the PDF again, (for example don't need to edit the form after the client pays, etc), would it not be simpler to just print to PDF to create an invoice that could only be printed. You might still need to apply security to the document in acrobat to prevent editing.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 15, 2008 4:39 AM   in reply to (Neil_Johnson)
    Hi Paul,
    Is it possible to post the code for locking fields?

    Thanks
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 15, 2008 5:42 AM   in reply to (Neil_Johnson)
    If you post your email I will send it to you.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 17, 2008 12:19 PM   in reply to (Neil_Johnson)
    Hi Paul can you post to code. Im sure other might find it very very usefull. Thanks.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 17, 2008 12:59 PM   in reply to (Neil_Johnson)
    The code will not make sense unless it is in context of the form (I believe). I will post it here and you can decide for yourself:

    /********************************************************************* ****************
    Function: LockAllFields
    Description: This function will lock all fields.
    IN: The parent subform. It could also be an element that contains subform like form1
    OUT : nothing
    ********************************************************************** ****************/
    function LockAllFields(myParentObject){

    var allChildElements;
    var intNumElements;
    var currentElement;
    var j;

    //Get all the child nodes of the parent element
    allChildElements = myParentObject.nodes;

    //Total number of element in the object
    intNumElements = allChildElements.length;

    //Loop through all the child elements
    for(j=0; j< intNumElements;j++){
    currentElement = allChildElements.item(j);
    //If the element is another subform we'll recusively call the function again
    if(allChildElements.item(j).className == "subform"){
    LockAllFields(currentElement);
    }
    //If the objects are fields then set the access to readOnly
    else if(currentElement.className == "field"){

    currentElement.access = "readOnly";

    }
    //Check for exclusion groups - Radio Buttons
    else if(currentElement.className == "exclGroup"){
    for(k=0; k< currentElement.nodes.length;k++){
    if(currentElement.nodes.item(k).className == "field"){
    //set the access for the RadioButtons individually currentElement.access = "readOnly";
    }

    }
    }
    }
    }//end function
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 17, 2009 12:10 AM   in reply to pguerett

    where i put this code exactly ??

     

     

    this is my mail if u can send me a simple  please   i need do that important

     

     

    al-baker@msn.com

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 17, 2009 6:21 AM   in reply to alsaif999

    Here is a sample

     

    Paul

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 17, 2009 11:33 AM   in reply to pguerett

    The attachment has been queued so I cannot download it.

     

    Could you please send me it as well?    bmorash@london.ca

     

     

    Thanks.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 17, 2009 9:49 PM   in reply to pguerett

    i cannot download it !!

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 18, 2009 8:41 AM   in reply to pguerett

    Hey Paul, I've got a script that does the same thing but is a lot shorter...does yours do anything different from this:

     

    // Get the field containers from each page.
    for (var i = 0; i < xfa.host.numPages; i++) {
    var oFields = xfa.layout.pageContent(i, "field");
    var nodesLength = oFields.length;
    // Set the access type.
    for (var j = 0; j < nodesLength; j++) {
    var oItem = oFields.item(j);
    if (oItem != this) {
    oItem.access = "readOnly";
    }
    }
    }

     

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)