How to protect document level javascript against modification?

Hi,
Does Adobe Acrobat provide a possibility to password protect deactivation of the javascript code present in the pdf documentation?
It seems that 3rd party tools, like PDFill or CutePDF can not password protect the document properly and it is trivial to deactivate the code by putting a new code inside, even if the document is master password protected agains modifications.
Thanks for any information.

There's nothing to protect against the determined. If you have critical security functionality, embedding it at client end is not the way forward.

Similar Messages

  • How do you do document level javascript docopen in acrobat pro lifecycle designer

    You used to be able to do document level javascripts like document open and process parameters from a url to prefill a pdf file. 
    How do you do that in acrobat pro 10 or life cycle designer?
    Thanks in advance
    Dean-O

    Should be the same but it isn't. I have included a screenshot of my tools choices in both my Mac and PC versions - they are totally different.
    Mac version
    PC Version

  • Document-level javascript quandry

    Ok, completely clueless newbie here whose only coding experience is Access VBA…from a few years ago. Need to write up some Javascript to make this work – that was a month’s worth of a migraine.  I ask for your patience, and would like to ask for forgiveness in advance for any headaches I induce while you try to figure out my problem(s).  Also, I’m not sure how to copy paste images or code examples, but I will do my best.
    So, basic premise:  make a drop-down combo box that will populate another combo box based on whatever was selected in the first box – in this case, 31 items in the ‘Inventory Parts Used’ list, and a total of 427 respective sizes in the other list. 
    YES, I’ve already looked at that http://acrobatusers.com/tutorials/js_list_combo_livecycle1 example, and followed it closely.  Took me forever, but I somehow got it to work. Was very happy.  Only thing I couldn’t figure out was the export value b/c mine wasn’t a number.  But I solved that by putting the CodeID and respective PartSize together (ex: 4-inch Fire Hydrant would show up as "FH-01:  4"). Anyways, I selected that working row and choose the “Place Multiple Fields” option times 15 rows.  Still working.  I’m dancing a jig. Then I tried to check on the code: 
    “Text cannot be displayed in full by the Edit Dialog.  Please use an External Editor.” 
    Uh… So I deleted a row at a time until I could see what my limit was.  I had to pare down 15 rows to a measly 3 rows.  Took me a while but I was able to see where the problem was.  Instead of being written into the Document-Level JS, my array was tied to the first combo box’s Keystroke event on the Field Level.  So when I multiplied the rows, that humongous list essentially had diarrhea.
    I’ve tried to delete that header and keep it to Document Level.   It basically ignored me and keep those lines.  When I did manage to make the <Document-Level> on top, it just didn’t work.
    (    //<AcroForm>
    //<ACRO_source>Row0.InvPart:Keystroke</ACRO_source>
    //<ACRO_script>
    /*********** belongs to: AcroForm:Row0.InvPart:Keystroke ***********/    )
    I’ve searched other forums about the Document-level…. I swear I read a lot of forums that said using Advanced>Document Processing>Set Document Actions>Edit All was ok. Clearly it’s not ok, especially after I found this forum: http://answers.acrobatusers.com/Where-I-enter-document-level-javascript-adding-FormRouter- Calendar-q55527.aspx. 
    So I guess my question(s) is this:  IS that “Edit Document Javascripts” really necessary?  B/c I’ve looked and I don’t have it. I’m using Adobe Acrobat 9 Standard, ver 9.5.5 (and I’m using Windows XP Pro ver 2002 , if that matters).  Is this JS editor only available to the Pro version?  Would it really be a bad thing to just leave it alone as a keystroke event (aside from the unwieldy large, duplicated codes it vomits as a result)? Or maybe, is there a way to code a new row on instead?  I remember seeing an example where you can add more lines as needed, but I can’t for the life of me find it again.
    Thank you in advance for all your assistance.

    * Huh....it just figures... right after I finally give up and post up a question, I would find the answer. =_=;; http://forums.adobe.com/message/4727325#4727325. 
    So, Standard version apparently doesn't have that exalted “Edit Document Javascripts”.  Apparently a way around it is using the Page Open event.  Well, it works - the massive array only shows up once in the editor, and the multiple rows each call the function instead.  Nice. 
    Well, I will leave this up in case someone else can use the reference.  Thanks to anyone who read this and was going to answer me. =)
    Don't suppose anyone knows how to create a code to add new rows instead of having 15 rows straight off the bat?  Or should I make a new post for that?

  • Multiple document level javascripts

    Hi everyone,
    I've just created a document level javascript that assesses the viewer's version of acrobat. I also need to create another document level javascript that will open a popup menu when the document is opened, providing instructions on how to fill out the form. Since there will be two document level javascripts happening at the same time, ie. when the document opens, I wondered if someone could tell me if this is going to cause some conflict. I mean the second javascript that creates the instructions popup is going to happen for everyone when the document opens but the first viewer version javascript will only be triggered if the viewer's version is less than 7.5. So I wondered if someone opens the file and both javascripts are triggered, will this cause an error, or will both popup boxes appear on the screen at one time. I can't actually test this myself since my version of acrobat is current.
    Appreciate any advice.

    They will not lauch in parallel, but one after the other, probably based on their names.
    My suggestion to you is to just combine the two into a single script, each in its own function, and then run them in the order you prefer.

  • Document-level Javascript as Object

    I created a document level script called Utility.
    I want to create methods within this script rather than coding each one separately.
    function Utility()
    this.getFormattedDateOnly=function(pDate) {
      if (typeof pDate == "undefined") {
        pDate = new Date();
      var retval = util.printd("m/dd/yyyy",pDate);
      return retval;
    this.getFldsOnPagenum = function(pPageNum, pDoc) {
      /* returns an array of the form fields who are on or start on a page */
      /* zero based return ; however pPageNum is 1 thru numPages, not 0 -> numPages-1 */
      var currPage;
      var currFld;
      var cnt = -1;
      var ARflds = [];
    CPR("# flds=" + pDoc.numFields+" Type of pDoc:"+ (typeof pDoc));
      for (var i = 0; i < pDoc.numFields; i++) {
        currFld = pDoc.getNthFieldName(i);
        if (typeof currFld.page == "number") {
    CPR("page="+(1*currFld.page+1));
          if ((1*currFld.page+1) == pPageNum) {
            cnt++;
            ARflds.length = cnt + 1;
            ARflds[cnt] = currFld;
    CPR("\n cnt="+cnt);
        } else if ((1*currFld.page[0]+1) == pPageNum) {
          cnt++;
          ARflds.length = cnt + 1;
          ARflds[cnt] = currFld;
      return ARflds;
    var MyUtil = new Utility();
    This is all working fine with the following exceptions:
    1) the methods are not being registered in the Javascript hierarchy listing.
    That's annoying.
    2) "This" is not recognized at the document level....I must pass it as a parameter (pDoc).
    I thought that was strange...I could see it if were at the folder level.
    It appears the document object is out-of-scope !!
    3) currFld = pDoc.getNthFieldName(i);
    The above is failing....sending back a "currFld is undefined" error.
    I don't see the problem....very strange IMHO.
    When I call the getNthFieldName function from the console....no problem.
    What am I doing wrong in the definition here ?
    It appears that what I did has Acrobat functions and document properties out-of-scope.

    I think this would work if you could make the document object a member of the Object being created.
    To do that, a constructor needs to be invoked so that it can instantiate a public property of the Object.
    var MyUtil = new Utility(this);
    inside of Utility I would have:
    this.oPDFdoc =  this;
    thereby transferring a reference to the entire PDF document to my Object.
    Getting this to work would eliminate the need for all of the document-level javascript references.

  • Integration of javascript libraries with Acrobat Document Level Javascript

    I have a requirement to build a custom SOAP message and process a PDF document as a SOAP attachment sent to a specific endpoint.
    Document level javascript presents a tool that when coupled with a third party javascript library could be used to capture the PDF document and send it as a custom SOAP message built entirely with Javascript.
    Does document level javascript allow for integration with third party libraries like Dojo or the like?
    Any examples available of document level javascript including known third party javascript/ajax libraries?

    Ajax and other JS libraries can't really be used in Acrobat. You can load them, of course, but they're built for JS that runs in web-browsers and will not be of much use in a PDF.

  • Document Level Javascript

    Is it possible to create document level javascript ?
    I would like to create a function that I would be able to call in events.
    And is it possible to store an object (like an ADBC connection) at the document level to access it where I want ?
    Thanks.
    Laurent

    There is something called "script object". The script object is an object that you can use to store JavaScript functions and values separately from any particular form object. Typically you use the script object to create custom functions and methods that you want to use as part of scripts in many locations on your form. This technique reduce the overall amount of scripting required to perform repetitive actions.
    To add a new script object to your form:
    - Create a new form or open an existing form.
    - In the Hierarchy palette, right-click either a form-level object or a subform-level object and select Insert Script Object.
    - You can rename your script object (optional) by right-click the script object and select Rename Object.

  • How to load doc-level JavaScript via FDF

    I apologize if this question is answered elsewhere on the forum -- I've spent a fair amount of time searching through the forum and other resources brought up in response to Google searches, all without a solid result; therefore I'm hoping that someone in the forum can help out.
    I've got several dozen PDF forms that all use the same core set of JavaScript functions to perform various validation and formatting processes. So far, I've loaded this library as a document-level script in each PDF and then loaded the PDFs to the server.
    When a user requests to view their specific document, the link that they click actually generates an FDF file that is sent to their browser. The FDF causes the target PDF to be loaded in the browser, into which the FDF data is loaded. A page load Script executes the do_DocLoad function, which sets up the document for initial user use (populates combo boxes, etc.) The user then can interact with the form in various ways and then, optionally, submit the data back to the server for processing. The library functions are referenced in various field formatting or validation calls, as well as by the Submit button that I've got on the form that performs a final field validation prior to submission. So far, this process works very well.
    The issue is that every time a change, even a minor one, is needed in any of the core set of library functions, we have to open each and every PDF to apply the change, then save it and upload the entire batch to the server. Because of the significant amount of time that this can take (which will increase as the PDF library grows), I'd like to instead load the JavaScript functions in the FDF.
    The ideal would be a method to allow the FDF to cause Acrobat to load the script from a file on the server, similar to how the PDF is called. Because I don't know if that would even work, I'm looking at having the ASPX page that processes the FDF, merging the user's data into the FDF format before serving it to the browser also merge in the script and serve it all up piping hot for the user's enjoyment (or so we hope). I've tinkered with the FDF, adding a /JavaScript section at the end of the FDF as follows:
        << /V (~data_client_name~)/T (client_name)>>
        << /V (~data_client_address~)/T (client_address)>>]
        /F (~data_FileName~)/ID [ <  blah blah ><  blah blah >]
        /JavaScript << /Doc 2 0 R >>
      >>
    >>
    endobj
    2 0 obj [ (DocScript1) 3 0 R ] endobj
    3 0 obj <<>>
    stream
    ** script goes here **
    endstream
    endobj
    trailer << /Root 1 0 R >>
    %%EOF
    In the section where ** script goes here ** I have attempted to paste the script library, without success. This library consists of several different JavaScript functions.
    In testing, the above didn't work, unfortunately. :-( I got all kinds of wierd data in the form fields that are processed by the functions that I was trying to load - the page open calls didn't return any errors, which was good, but the fields formatted by the initial setup method were all messed up. I'm looking for any pointers/tips on what I might be doing wrong. Are there special characters that I need to escape/avoid in sending JavaScript this way (I'm using regular expression pattern matching and other code within the script which contain some special characters such as /, \, ^, etc.). Is there a limit to the size of the data that I can stream in this way? Is it as simple as loading my script /Before instead of /Doc? Anything else that I might try?
    Thanks in advance for any assistance that can be given! Every time that I get to go back and spend a couple of hours updating the core library in all of these PDFs is time that I'd rather be spending doing other things. Thanks again!

    This sounds very intriguing and not at all along the lines of what I was thinking of. I'm glad to have the forums to be able to get different perspectives on
    things like this!
    I have a couple of additional questions on this. I like #3 but, not having done it before, I'm curious as to how to get it to work.
    I presume that I would create a new batch process in Acrobat (I am running Acrobat Pro 9) and then on each document processed, do the following:
    1. Import a PDF page (from a specified file that has the document-level scripts included.
    2. Delete the page just-added
    3. Save
    4. Repeat, all docs specified.
    Now questions:
    1. I don't understand how the document scripts will be "left behind" when doing this.
    2. Do I need to delete the existing document script(s) before doing this, or will they automagically be overwritten?
    3. Are there any steps between the insert and the delete that I need to do?
    Finally, just to add another twist, have you seen this work with PDFs that are secured (we apply a password to protect the documents from alteration, with the exception of filling out form fields)?
    So far, in testing, the best method appears to be to store the PDFs separate in an un-secured format (it simply won't work if they're secured -- at least, I haven't gotten it to work yet -- I could probably do it interactively, but who wants to type the goofy password 500 times). I have a separate dummy PDF (1 page with just some explanation text if someone opens it and document-level scripts included) also stored in the folder. Then, run the batch process to do the insert, delete, then apply security on all docs in the folder. So far, so good. The only part that doesn't seem to be working is that the document-level scripts on the dummy PDF don't get left behind after the insert/delete. I removed the doc-level scripts on the original PDFs so that I could more easily verify that the ones from the dummy PDF get "left behind". I'm sure that I'm missing something simple here -- If you can help close that final gap, I'd greatly appreciate it!

  • Acrobat crashed and i lost all document level javascript

    Hi, while working with acrobat professional 9 i got an error messages and acrobat crashed. I had 300 lines of javascript code on document level and after i reopened the pdf document it wasn't there even though i had been saving the document many time before the error ccurred. Any idea how can i retrieve that javascript back? And why did it all disappear?

    Thank you very much for your reply but I already tried this and it didn't work. I will try to review all the sites visited over several months of which these tabs were accumulated . What a big hassle. I do notice that Firefox has crashed fairly often . Its just in the past I was able to retrieve my open tabs. I may go back to Internet Explorer. Thanks again for you help.

  • Document Level JavaScript to turn off caching for a PDF?

    I have been trying to find a way to ensure that a fillable PDF leaves no trace of itself on a computer that was used to open it. For example, if a user acceses a fillable PDF via browser or Reader, once they are done and have closed the browser or Reader, I want no trace of the information to remain in any cache on that machine. We don't want to require our users to try to control cache via settings in Reader, so I have been trying to find other ways to do this.
    I came across the following comment from GKaiseril in another thread - is this a way for a PDF to control its own caching? Any details or alternative approaches would be welcome!
    GKaiseril
    Re: Metadata - Can't remove
     You can also use document level JavaScirpts to turn off the auto complete and caching for a given PDF.

    Version 9 and 10 of Reader do not cache form data in a temporary FDF as previous version may have. The nocache document property it not even documented in the latest Acrobat JavaScript reference. If you're concerned about previous versions, you can use set the nocache document property at run-time, but users can disable JavaScript, so that approach is no guarantee.
    For information on controlling autocomplete, see: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.407.html

  • How to apply row level security against the database administrator

    I would like an advice in applying row level security against the database administrator. We need to prevent DBA from editing data in some table rows or have any indication that data was corrupted.
    There is no problem in viewing the data so we considered one way hash function or digital signature which will be stored in the same table, but we see following disadvantages:
    HASH - DBA may use the same hash function to update the stored data after he changes the sensitive row.
    Digital signature - the is a need to manage and keep the private key in a safe place outside of DB
    Is there additional ways to achieve the aim?

    Does VPD helps to prevent from DBA to edit/view a data in specific rows?Yes.
    If I correctly understand, DBA has full access to security policy used by VPD to control the access and can grant himself privileges that I don't want.You can to define which users can be exempt of the politics, for the context or by Grant EXEMPT.
    This includes DBAs.
    The simple fact of being DBA doesn't guarantee the exemption.
    Everything goes to depend of the VPD config.

  • Protect documents from accidental deletion/modification by site administrator

    Hi,
    I have several documents in a SharePoint site that should never be modified/deleted (except under extraordinary circumstances), so I'd like to make sure that even when logged in as Site Administrator I can't delete/edit these documents accidentally (though
    obviously I'd be able to grant myself permission to do so). I've tried just about every combination of permissions I can think of (at site collection, site, list and document level) but to no avail.  Surely I'm missing something obvious?
    The closest I've got is putting them in a library requiring check out and having them checked out to the system account, but that's far from ideal.
    Thanks
    Dylan

    that's not easy thing you trying to achieve. One thing manage your recycle because if a document deleted from a user, its still recover able in 60 days or what ever setting you select.
    here is if you want create a event reciever: http://www.the14folder.com/2011/07/20/prevent-accidental-deletion-sharepoint/
    or in 2013 you can use Ediscovery feture.
    http://msdn.microsoft.com/en-us/library/jj163267.aspx
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • VSTO: Word Automation how to Protect Document with Restricted Access

    hi all:
    As the title, how to achieve this in VSTO?
    Could you show some Word API for this requirement?
    Really thanks,
    Best regards,
    Riquel
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Actually I just want to use Automation/VSTO to implement "Restrict permission to content in files". Any idea?
    https://support.office.com/en-nz/article/Information-Rights-Management-in-Office-2010-c7a70797-6b1e-493f-acf7-92a39b85e30c?ui=en-US&rs=en-NZ&ad=NZ
    Thanks! 
    Best regards,
    Riquel
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Document level scripting

    I have read about document level scripting -
    This is a nice feature - since it allows a certain level of generalization rather that writing a scriptlet for each objects events.
    I am using Live cycle designer 8.2
    How can I create a document level javascript function ?  i can't see how to do it .
    I am familiar with java scripting and have been scripting for a number of events but i would really like to be able to have a callable function that I pass certain parmeters to for processing.
    please indicate how I can do this .
    Thanks

    You should post this in the LiveCycle Designer forum here, if you haven't already.

  • Is there a way to respond to Doc/Open events from a folder level javascript?

    I'm wondering if there's a way to respond to Doc/Open events from a folder level javascript. If not, is there a way to programatically add a Document javascript to a PDF upon/after export from InDesign?
    Thanks-
    Jeremy

    Bernd,
    Thanks for your reply. I take what you write to mean that I can add a document-level javascript manually once the PDF is exported. But this is what I'm trying to avoid.
    Ideally, I want to respond to Doc/Open events from a folder level javascript, but I'm not sure if/how I can make an event listener with Acrobat JS. If I can't do that, then I'm looking for a way to programatically add a Document level javascript upon export from InDesign - not manually within Acrobat, once the PDF is created.
    Any thoughts?

Maybe you are looking for

  • Why is my Mac running so slow?

    I have a Mac book late 2010 and it has 4 gb of ram. I got mountain lion and now every thing is slow like Turning on takes 1:30 to get to the log on screen. Loging in takes 30 sec opening any programs takes 30+ secs. Do you know why this is the case?

  • Problem in Creating New position in Siebel CRM 7.8 using java program

    Hi We have Siebel CRM with Business Object and Business Component as Position. Position Business Component has a manadatory pick list Division. When we try to create a new Position by picking the Divison then we are getting the below error Logged in

  • Code to Retrieve the message from Queue in Oracle BPEL

    Actually I am placing the Message into JMS Queue using JMS Adapter.After Placing the message,I need to retrieve the placed message from same queue. Right now I am using the Receive Activity and the JMS Adapter to retrieve the message from Queue.But m

  • Lockbox Cash app not applying correct

    Here is an example of an issue I am having. On 4/4 check # 15093 (Doc # 140008734 and # 100014472) created one deduction for $3,076.77 and two overpayments ($167.53 and $704.34).  On 4/19 check # 15194 (Doc # 1400010705) was system applied. This appl

  • Info record creation - Bapi or standard function module

    Hi All,   Is there any std function module or bapi to create Info record in transaction Me11 transaction. <REMOVED BY MODERATOR> Regards, Vinoth. Edited by: Alvaro Tejada Galindo on Apr 14, 2008 1:27 PM