Unlock the power of Acrobat SDK through our community.
Als letztes aktiv
I'm building an interactive PDF with JS in a project which requires language localization, so there's a bunch of strings in the JS with non-english characters.Acrobat seems to support this nicely until you get an external JS editor involved, in which case Acrobat corrupts the code, replacing the non-english characters with garbage (see the proof of concept example below).Why use the external editor at all? For small projects, you can paste your code from your preferred editor into Acrobat's bare bones internal JS editor, but once your code exceeds a certain character limit, Acrobat requires you to use an external editor exclusively. I haven't had any problems with this configuration when the code and strings made up of english characters.If anybody has any ideas on how I might fix this, I'd be very appreciative.Code maintained entirely within Acrobat:/*---------- Begin PDF Document Script ----------*/function Open(){}/*---------- Begin VARIABLE declaration ----------*/// Field to varia
Hello,I have the following three rowsCREDITRow1 has the following custom validation script: this.getField("DEBITRow1").readonly = (Number(event.value)>0);If I enter a value in DEBITRow1 it correctly make CREDITRow1 read only, but when I go to tab from DEBITRow1 to Line DescriptionRow1 it tabs back to the top of the page and the first field. How can I correct this?Thank you
A form that was previously working perfectly now seems to be giving me some grief with the New Year having come upon us. This form is set to start at the current month and go back one month concurrently as below:1/2019 12/2018 11/2018 10/2018 9/2018It was doing this until the new year of 2019 came up and now it's duplicating some dates and looks like..1/2019 12/2018 12/2018 10/2018 10/2018I'm looking for some help to fix this issue and get it back to the way it is meant to be updating.Document level Javascripts are:To get first field:this.getField("Today").value = util.printd("mm/yyyy", new Date()); To get other fields:function getPastDate(Today, months){ var v = this.getField(Today).valueAsString if (v=="") return ""; var cDate = util.scand("dd/mm/yyyy",new Date("01/"+v)); if (cDate== null){ app.alert(
I have 6 dropdowns but based on space restrictions I had to include a script that showed the dropdown options on two lines instead of just one (kinda like a wrap around). I have the export values set for each item and a text box (TOTAL) that is set to calculate the export value for each dropdown based on the selections. However, the calculation is not happening. I'm sure it has something to do with the "wrap around" script, but I have no idea what I need to do next. Any suggestions would be appreciated. Below is how I have things set up right now.Dropdown1 through Dropdown 6:ITEM: FullyMet MostlyMet PartiallyMet SomewhatMet NotMetEXPORT: 10 7.5
Hello,I currently have 150 pdfs that need signed and no one wants to sign them cause of the amount. In order to get them signed I was thinking about creating a signature field with date to each pdf. these pdfs will have the signature field in an exact location for every one and on the the first page. I am fairly new to scripting so anything would help.If yall also could point me in the right direction to do this as a batch process that would be great.
Hi.I have a big document with confidential information. We have to send it to a person, but we must to hide some information in it.My collegue has been working in the document for several days adding white blocks wherever a critic information is. She added a white gif image and rearranged the size for every situation.Now we have realized that the block should be black.I tried to run a Javascript to change the colour of the blocks but i't doesn't work.This is the code: // Get a color convert action var toBlack= this.getColorConvertAction(); // Set up the action for a conversion to Black toBlack.matchAttributesAll = toBlack.constants.objectFlags.ObjImage toBlack.convertProfile = "Apple RGB"; toBlack.convertIntent = toBlack.constants.renderingIntents.Document;&nbs
Need some help with the following code. Everything works, ie export pages based on bookmarks with temp file names. That is until I add code to go and export the file with the name of its bookmark. Then I get the following error. Any help would be appreciated thanks.RangeError: Invalid argument value.Doc.extractPages:7:Document-Level:testThis worksconsole.clear();oDoc = this;bkTrgt = []this.bookmarkRoot.children.forEach(function(a){a.execute();bkTrgt.push(pageNum);})bkTrgt.forEach(function(a,i,k){oDoc.extractPages(k,((i+1)<k.length)?k[i+1]-1:oDoc.numPages-1);});This Doesntconsole.clear();oDoc = this;bkTrgt = []this.bookmarkRoot.children.forEach(function(a){a.execute();bkTrgt.push(pageNum);})bkTrgt.forEach(function(a,i,k){oDoc.extractPages(k,((i+1)<k.length)?k[i+1]-1:oDoc.numPages-1,oDoc.bookmarkRoot.children.name + ".pdf");});
Good evening I am attempting to create large if-then structured built into Functions.However, I am running into the problem of not being able to write IF-ELSE statements, when the argument is whether a drop-box is empty, or not.Here is an example:var dropBox = this.getField("Drop Box)";var SourceField = this.getField("Source");if (dropBox.valueAsString != "") { console.println(sourceField);}Even if Drop Box has no strings selected, it still won't complete the statement.Any help would be greatly appreciated!
So a helpful member of the community helped me with JS that will populate other text fields based on a selection. Now the issue is, these text fields don't populate as soon as you click on them. Can anyone help please with how I may be able to accomplish this, more info: I can't work Option2 to populate its values to the fields when I click on it. Here is the code:var text1Value = "";var text2Value = "";switch (this.getField("dropdownList").value){ case "Option1": text1Value = "Option1Value"; text2Value = "Option1Value"; break; case "Option2": text1Value = "Option2Value"; text2Value = "Option2Value"; &
My quote generator code is currently set at document level (see below);this.getField("quote_number").value = util.printf("%06d", Math.floor((Math.random() * 1000000) + 1));I would like to be able to save a copy of the form after it is filled out, but when I save the form now and reopen it, it generates a new quote number.I believe this can be done using a global object, but I am not sure how to set that up.Any advice is greatly appreciated!Thank you in advance! 🙂
Hallo!Ich komme leider selber icht darauf und die Suchergebnisse machen mich auch nicht schlauer Ich habe ein PDF Formular erstellt, nun wird aber gewünscht das wenn man das Feld ausfüllt dies automatisch in Großbustaben geschieht, egal was der jeweilige Nutzer des Formulars drückt/eingibt.Könnt ihr mir da helfen?DankeLG[ moved from Acrobat Community for Public Sector Professionals to JavaScript by moderator ]
HelloI am embarrassed to ask this question because I am self taught on JS and using the console for error debugging - and I taught myself on Pro 9 - however overnight, my office has upgraded me to Pro 2017 and now I find the the console / debugger completely useless. Instead of telling me which field has the issue, I now only see:TypeError: this.getField(..) is null1:Field:CalculateIn the button I hit (which was a reset button) I have dozens of fields that are set to do certain things on reset - it used to say for example:this.getField("HolderOne") is null so I knew exactly where the issue was. I kind of use it throughout the document and to test each execution as I create it. I don't really work in the document level script, I use the properties to add my script in.Could anyone possibly suggest how I can use this kind of error message to actually find my problem? Do I have a setting wrong? I lot of the time I am having a stab in th
I'm new to javascript, but have read various threads and tried several solutions. One of them worked in October...but now now longer works OR gives any error code. Any help is greatly appreciated.I am running the application forms on (3) computers on an office network.I have a button on the form that is SUPPOSED to "silent save" the finished application with the applicants LASTNAME, FIRSTNAME DATE with "application.pdf" at the end. For example: DOE, JOHN 01292019 APPLICATION.pdfI am running Adobe Acrobat Pro DC in Windows 10I know there is supposed to be "trusted functions" in the folder level and user level of each machine. I believe that means WHERE the finished application is stored and under the Adobe Javascripts folder. I am now so confused from all of the threads from 2010 to 2018 that I don't know where to go...Thanks again for any help.
Good evening, I am attempting to access a drop down list, however, I can't seem to change the value of the Drop down box within JS. Here is my code: var ListOne = this.getField("relationship.0"); var search = ListOne.getItemAt[1]; console.println(search.value);I can print out the current value that's set in the drop down list, but I can't set it to, "Mother" or, "Brother."Any help would be greatly appreciated!
Hello,this is a really simple question but still I cannot see anyone with this problem.I am only trying to set the value of a field using:this.getField("myField").value = 3;but I get an InvalidSetError.However I can set the value if I use the importTextData function. So the field name is correct, it is writable but doesn't accept a value.Thank you
How do you filter a dropdown list based on user input. Say, the countries list. when the user types either "a" or "A" the dropdown list should list all country names starting with "A". Usage in standard PDF Form and not in Lifecycle Designer form. Thanks.
Hi all, is it possible to disable the saveAs menu option in PDF? Via JS or preferences?Thanks and regards!Juan Carlos
Hello!I tried to search for this but all i find is a custom save button with script for changeing the filename. In my case i want to add multiple signatures to a file. every time i add a signature, i am asked to save the file including the signature. i want the save option to automatically change the file name to a value like e.g. "order number" which is declare on the top.Is there a way to implement this?
helloi have certificate and i want add digital signature to pdf file.how i can do it using js api
Box 1 and Box 2 are dropdown boxes with the first value as default which is a blank line. I would like the Box 2 value to show the 2nd item in the dropdown list ("E") by default anytime Box 1 has been changed to another value than the default or blank line value.
At work, I use Acrobat Standard XI. I use Javscript. My task is to create a PDF file which on the Acrobat Reader page will be able to hide or display an existing Template. I use: this.getTemplate (name) .hidden = false; this.getTemplate (name) .hidden = true; In AcrobatReader, NotAlloweError is displayed. My task is to create a PDF file for submitting applications. The structure of the document is such that depending on what I choose to display a specific Template. What I need to do to hide or display the template is to be possible on the AcrobatReader page
I use Acrobat Standard XI. There are seven pages in the PDF document, three pages used at the start. I use AcrobatReader. At the start 4,5,6,7 page is invisible. In AcrobatReader I have to display page 4, 5 or 6 after selecting individual commands. By executing the command in AdobeReader - Javascript this.getTemplate (name) .hidden = false I get the message NotAlloweError. What should I do to exclude this?
I am working on creating a vba script (Excel) that will create a pdf and fix the width of the document to size of the view port. I reviewed the Interapplication Communication API Reference documentation that list all of the methods and properties of the api. I want to use the “SetPreferenceEx” method to set the Zoom preference to a value of Fit Width. In the instructions (page28), the method provides the data type and description of the parameters. The first parameter is expecting an application preference to be provided, for example, I would expect to be able to pass “Zoom” into this parameter. I have been unsuccessful in trying to set this parameter. The description says to go to the Acrobat and PDF Library API reference for a list of preference items. I found the document here , the issue I am having is that document has over 6,000 pages and I have been unsuccessful in finding the list of preferences. I was hoping you
I am attempting to fill multiple form entries (mostly text boxes, some drop-downs) using a button.The button is correctly resetting the hidden fields which generate the required random numbers, but attempting to change other field values is where it's breaking.I'm using:this.form.elements("Fel_Roll").value=Fel;I've also triedthis.getField("Fel_Roll").value=Fel;Fel is holding the random number and Fell_Roll is the field I want to have it input into IF the button is pressed.I have also attempted it without the reset function, simply using the values currently in the (will be) hidden fields.
I have a document with three dropdowns and I need to populate a text field based on them.One drop down is a description, one is size, and one is the color. I need different combos of these fields to populate a text field with the correct item code.For example: If a user selects "boots" from the first drop down, "7" from the size dropdown, and "blue" from the color drop down ---it should show the item code BB7456 in the item code text field. This item code would also be different if a different size or color was chosen.
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
Sie haben bereits einen Account? Anmelden
Noch kein Konto? Konto erstellen
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.