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.

Similar Messages

  • Problem with hp 1525 color laser with acrobat documents

    first of all, is this the proper place to post a printer questioni?
    i didn't see a forum for printers
    the hp 1525 pushes the footer of pdf documents up the page.  the top margin stays fine but the bottom one goes up.
    i thought it was a problem in acrobat, but i just printed on brother and it came out fine.
    i can't find what setting i should change.
    the hp 1525 does fine with all other documents.
    it crunches the margins more in double sided mode than in factory defaults--but it does it in factory default too.
    also, is it possible to get in touch with hp support.  i can't find contact information.
    windows seven.  but it did this on xp too.  i had been thinking all along it was an adobe problem and have been looking all over the place for a solution for a few months now.
    i would very much appreciate any help.

    Hi jaxcrax, 
    Do you have the same issue in a different PDF reader? 
    http://www.foxitsoftware.com/downloads/
    I am an HP employee.
    Say Thanks by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"

  • Document level script to display zeros in calcuated field

    I have created a form, with the calculated fields set to read only, and with a validation script of
    if (event.value == 0) event.value = '';
    (so that the calculated fields do not display as $0.00)
    All but four of the calculated fields are named Item.0, Item.1 etc., plus there are SubTotal, ShippingCharge, CCFee and Total fields that need to stay blank until data is entered into the form.
    Initially, I tried to add the script as a document level script, but it didn't work and I'm thinking it needs more to the script to use at the document level, but I have no idea what more it needs.
    Where did I go wrong?  It certainly would be quicker to add calculated fields if I didn't have to add that validation script to each.

    Even with a document level script you would need to call it in every calculated field.
    I you were to write "app.alert("Hello World");" as a document level function, it would only execute when the PDF was initialized or opened and not again as long as the PDF remained open.
    If you rote a document level function using JavaScript like:
    function Hello() {
    appp.alert"Hello World, I am a function");
    return true;
    It would never run until called  with  a JavaScript statement like "Hello();"
    So even with a document level script and preferably a function, you still would need to edit every calculation to call the function or the script would never run.
    You could also create a document level function to suppress the zero display and then write more code to add the call to this function to the calculated fields.
    You need to learn more about the scope of items, how events are processed within a PDF, what functions are and how to use them effectively. You might want to start with getting or linking to a copy the Acrobat JS API Reference.

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

  • 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

  • Users are unable to synchronize document libraries with OneDrive for Business

    Hello,
    We are having an issue with our users attempting to synchronize document libraries with OneDrive for Business. When a user tried to synchronize the document library either via the "SYNC" button on the document library page using IE or by
    manually entering the document libraries path into the OneDrive for Business desktop app they receive the following error
    "We can't connect to the specified SharePoint site". The users have the Edit permission to both the site and the document library. I have performed the following actions in attempt to get the synchronization to work.
    1. Tested giving user the owner permission to the site and document library. same result.
    2. Performed a repair on the users Office 2013 installation.
    An interesting point to note is that I myself am able to synchronize the document libraries using both the "SYNC" button on the document library site and by entering the path manually in the desktop app. Difference between my account and the test
    accounts is that I'm a site collection administrator and farm administrator. Can anyone shed some light onto this issue?

    Hi Corey,
    According to your description, my understanding is that the users cannot sync document libraries with OneDrive for Business.
    I recommend to check the Permission Level to see if the Use Client Integration Features permission is selected.
    If not, check this permission in the corresponding permission level which is granted to the users.
    Please also check if the users have the right permission to sync the document library with OneDrive for Business.
    More reference:
    http://nheylen.wordpress.com/2014/05/15/sync-error-we-cant-connect-to-the-specified-sharepoint-site/
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

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

  • Problem opening documents from SharePoint (2013) libraries with Office 2010 and 2013 components installed

    Hi
    I've been encountering the problem of Office files failing to open from SharePoint 2013 libraries with the prefix of 'ms-excel:ofv|u|' etc. in the url. Following the
    helpful questions and answers in the forum, I've identified the likely cause as the fact that my main Office installation is 2010, but I also have installed OneDrive for Business 2013 (which I need in order to sync document libraries with my local drive).
    The solution I've seen suggested elsewhere of deactivating the SharePoint integration of Office 2013 components fails for two reasons: there is no way (or at least, I can't find one) of deactivating SharePoint integration probably because, deactivating
    SharePoint integration would likely stop the syncing of libraries/folders.
    One thing that I have noticed in my case that I've not seen mentioned elsewhere is that if I right-click a document and select 'open in new tab/window' the required
    document opens directly in the relevant office package. I don't know if this is a useful observation, but it seems to be new information.
    My question is, is there a way I can continue to sync libraries and open Office documents directly in Office 2010? My thoughts are possible changes to registry settings
    (which I can do, but don't know enough to find the correct ones myself) or (re)installation of software in some appropriate order to leave the correct settings.
    I have 'repaired' my Office 2010 installation without any observed affect on behavior.
    Thanks
    Ray
    (I've just seen a suggestion that Office 2010 SP2 may fix this issue. I've requested to test this, but whilst this may fix my problem, rolling it out to
    other users may be more problematic. In the meantime, other suggestions of solutions are welcome)

    Hi,
    According to your description, it is a good way to do a test about office 2010 SP2, here is an article about this issue- limitations of using the OneDrive for Business sync app with Office 2010 applications , it may help you.
    http://office.microsoft.com/en-us/sharepoint-help/solve-problems-youre-having-with-the-onedrive-for-business-sync-app-HA104047973.aspx
    Paul Shui
    Microsoft Online Community Support
    Please remember to click “Mark as Answer?on the post that helps you, and to click “Unmark as Answer?if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread

  • 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?

  • Can I with Javascript force Chrome users to open a PDF with Acrobat

    I have built a document in InDesign and exported to an Interactive PDF. I originally had issues with acrobat highlighting interactive buttons with a blue box but was able to get around this with a couple simple JavaScript lines that disabled this feature then re-enabled on closing. You can view the thread with my resolution here:
    Button Highlight in Interactive PDF from InDesign CC
    Great but now I have another issue. If the user opens with Chrome and has not disabled "Chrome's" PDF viewer the above JavaScript is ignored or not functional. It there a way with JavaScript or some other method to force the PDF to be opened with Acrobat in Chrome?
    I Miss FLASH this project would have been 100 times easier with action script and consistent across browsers ... curse you Steve Jobs.

    You need to not just think about Chrome. There is
    - FireFox
    - Microsoft Reader (comes with Windows 8)
    - Preview (comes with Mac)
    - iPad native PDF viewe
    - Android native PDF viewer
    Anyone getting a computer or tablet today can read PDFs without getting Adobe Reader and you need to give them a pretty compelling reason for them to download Adobe Reader to do what (they believe that) they can already do. I think it's the death knell for PDF forms.

  • 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

  • Delete Document Level Script Using JavaScript?

    Hello all.
    Is there a way for a document level script to delete itself? I am running Adobe Acrobat Professional 11.
    My situation is that I am currently analysing data using a Java application. The Java application taylors a script to suit each specific PDF, and then inserts it into the PDF automatically. When the PDF is opened, the script runs once and then is no longer needed.
    As the script is no longer needed it would be preferred if the script could automatically be deleted. Is it possible the script has access to the field in which it is stored (e.g. doc.javascriptField = "";)? Or by some miracle, a delete function already exists?
    I think that due to the lack of need for such a function by general and advanced users I won't get the answer I am hoping for. But it is worth a shot. In the mean time, I am inserting a flag into the KeyWord field so that the script does not run twice. It works, but it is not exactly clean.
    Any help would be greatly appreciated.
    Thanks
    Jonny O

    My original idea of...
    stamper.addJavaScript("this.addScript("oneTimeScript", "app.alert('Annoying Popup')")");
    Did not work.
    However, while debugging I did come across the name given to a script added via iText (Java library). The default is "000000000000000". With any added scripts being incremented by 1. So the this.removeScript("ScriptName") function works perfectly.
    Thanks
    Jonny O

  • Adobe javascript include "this.saveas" into the pdf document level

    Hello,
    in some posts i read that if i certify a pdf, i would be able to include doc.saveas into the pdf document level. 
    Can anybody tell me what kind of cerify i'd need and how to have it done to make the saveas work from client side?
    thanks alot

    When you use the saveAs method with code inside the PDF, do not place it in a trusted function or use app.beginPriv/app.EndPriv. You have to confirm that the certificate is in your list of trusted certificates and that it is trusted to allow execution of high privilege JavaScript. Be sure to test the document with Reader and validate the signature before attempting to execute the code. There is a preference that controls whether signatures are validated when a document is opened. I would recommend setting this preference.
    I would suggest testing it with Reader.

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

  • Can't create hyperlinks after converting a Word document with Acrobat XI Pro

    Hello,
    Here's my problem.
    I'm making a catalog document for my company.
    The document that I'm converting to PDF is made on Office Word 2013 and it's a .docx format file.
    I'm on Windows 8 and the latest version of Adobe Acrobat XI Pro installed.
    Inside my word document I have some pictures that have a hyperlink. Those hyperlinks directionate to a bookmark inside the word document. Inside the word document, if I do Ctrl+Click over the image, it will go to the page that has that bookmark. And it works. Period.
    Beside that I also have some Cross-references on the word document. Those cross-references basically are the page number from the bookmark reference. By accident on most of those cross-refrences I left enabled the "Insert as hyperlink" on the cross-reference box options. When I Ctrl+Click over those cross-references I also go into the page of that cross-reference.
    After I convert the word document into pdf, I can't get any hyperlink on the pictures, if I simply click on them, like if I click on a hyperlink on a webpage or something similar, the pdf won't go the the bookmark on the page that I've set on the word document.
    The funny thing is that if I click on the other cross-references I can go to the page were that cross-reference is...
    I tried all the methods to convert the file in order to obtain hyperlinks on the images...
    I tried to use the Acrobat tab and the File -> Save as Adobe PDF, as both uses Acrobat PDFMaker, but nothing works.
    Even tried all options on Acrobat PDFMaker but can't get it. "Create bookmarks", "Add links", "Convert Word Bookmarks", "...Word Styles to Bookmarks", "...Word Headings to Bookmarks", none works....
    If I try to simply print from inside Word by choosing the Adobe PDF printer (like if I choose a regular printer), in the printers options it doesn't show up any hyperlink/link/bookmark option related, so that way is definitely a no go...
    To reference, on 2006/2007 I also worked on a similar project and used this method on the word document (on Word 2003). At that time I had another Adobe Acrobat version, can't remember what version was...
    This hyperlink situation was without any problem. After conversion, on the pdf file, if I click on a image it went to the right place inside that pdf file...
    So I'm simply lost wether it's a problem of me, a problem of Word, a problem from Acrobat... simply lost...
    I'm desperated....please, someone help me!!!

    Ok, sorry for never talk since the last time, but I finally discovered why I had this problem.
    I found out that M$ decided somehow to change the process of embedded hyperlinks on a image, but in a docx it doesn't get affected. Only after transforming it into a pdf by Acrobat that the problem emerges...
    I found this site http://www.pb-solv.net/2013/08/embed-pictures-in-microsoft-word.html
    Basically all I have to do is "Use Insert, Quick Parts, Field, IncludePicture. This inserts the picture in the old way as a field. You can use Alt-F9 to reveal the field codes and change the images to be embedded rather than linked."
    Then, after converting it with acrobat, the pdf finally have hyperlinks on the images!!!
    They change this on Word 2007. As I had the 2003, at the time, I didn't had this problem.
    As I said, M$ changed something, but only is affected after converting with acrobat. So, acrobat also missed something in the process. I call it a 50/50 guilt.
    To bad no one ever notice this problem...

Maybe you are looking for

  • My playlists in iOS6/iPhone 5 is not updated

    iTunes Match ***** sometimes. I added some songs into my playlist from my Mac mini. Immediately, songs/playlists were synced in the other computer (iMac). HOWEVER, nothing was updated in my iOS devices (with iOS6)!!!!!! Both my iPhone and iPad are st

  • Mini telling me to delete files on startup disk

    A screen started popping up last night telling me to close all my applications to create more space and that I needed to delete files off of my startup disk because it is too full. I'm not sure what files to delete, and/or, if I should even pay atten

  • Photos don't import

    i tunes syncs my music correctly, imports cds, etc but MY PICTURES will not import, even though boxes are checked under PHOTOS. using latest itunes 8.1

  • How do I set up so I can recieve email notifications from my sky account

    Looking to find out how to recieve notification on my iPad from my sky email account

  • After Effects problem with clone stamp tool

    Hi, I've been using clone stamp tool in Photoshop for years and has no problem with it. But somehow I could never get it work on After Effects. After alt+click to select source I can then click (and hold left mouse button), rub and change the target