Unlock the power of Acrobat SDK through our community.
Récent
If someone checks the check box, I want the amount of kms collected and totaled at the bottom. If the check mark is not checked, do not grab the number of kms in that line. I just learned JS in the last week in order to make this calculation work on a fillable PDF...so excuse my lack of knowledge and/or background!! I have got it to add up the amounts before, but it didn't work if I unchecked a box and didn't work when I started to add more lines. It seemed to not like when the check array returns a NULL. Currently, it won't add anything and it's returning a zero. Can anyone see where I have gone wrong in the code below? Thanks!var check = ["Check.1", "Check.2", "Check.3"];var km = ["KMsRow1", "KMsRow2", "KMsRow3"];function myKM(){var KM = 0; var i = 0; var c = 0; for (i = 0; i < 20; i++) {if(this.getField(check) == 1) {KM.value += this.getField(km); event.value = parseFloat(KM);} else {event.value = pars
I need a formula to add two boxes (subtotal and other charges) and then times that by the tax rate (which will be input at the point of sale). Can anyone else me write this equation? I am happy to email you my pdf or really anything to get this last step completed. --Thank you!
I have created a form that includes two questions with Yes or No radio buttons for answers. I would like to make them required so that the first question has to be answered before moving on to the next question. Is there a way to do that?Ex: Is the applicant is an individual? Yes or No (I have named this set of radio buttons "HMDA"). I don’t want people to tab through this question without answering it first. Once it is answered I would like them to be directed to the next question which is "Is the applicant an entity?" Yes or No (I have named this set of radio buttons "BeneficialOwner").Thanks
I have Acrobat Pro DC with a combo/dropdown box ("Regulation) which is populated by another parent dropdown box. When I change the value on "Regulation" box, i.e.: select a Regulation), it populates yet another combo box ("RegSections") with the appropriate sections for the particular regulation selected such as: 2, 2(1), 2(2) etc.. See image of fields below.That all works great as they're using the "Case" command. BUT when I choose a section from the last box, it's supposed to populate a text box with the appropriate regulatory description for the section selected. It is a good 1225 lines long and works fine on the "RegSections" Blur event but that means an officer would need to click outside the box before the proper text shows up in the text box ("sfd_reg"). Currently the js is simply a nested if/else-if setup.What I've been trying to do is make it work on the "RegSections" Custom Keystroke event. So I added a if(!event.willcommit){ to the top of the script and the closing "}" right
Before Acrobat DC, I was able to go to the Combine Files dialog box, and one of the choices was "Add Open Files". In Acrobat DC, "Add Open Files" is not in the Add Files drop down list. Was this command removed from Acrobat DC?
I have 2 boxes - 1) Is a running total 2) Cash Avail. I want to write code that will change the Running Total fill to red if the amount is above the Cash AvailHere is what I havevar RT = this.getField("Run_Total");var CA = this.getField("CashAvail");if(RT.value > CA.value){event.RT.fillColor = color.red;}else { event.RT.fillColor = color.transparent;}I also triedvar RT = this.getField("Run_Total").value;var CA = this.getField("CashAvail").value;if(RT> CA){event.fillColor = color.red;}else { event.fillColor = color.transparent;}But nothing happens. I am sure I am missing something.very simple
I'm trying setup a validation script that confirms that the user has entered a pre-approved number, and returns an app alert if they do not. I have a the script functioning properly but the array of pre-approved numbers is too large for acrobat (text it too large to be displayed in this dialog). I'm trying to use variables for the redundant portions of these numbers to reduce the overall script size.Here's a sample of my script with a much smaller array of pre-approved numbers. event.rc = true;if (event.value != 1476542 && event.value != 1471222 && event.value != 1476895 && event.value != 1471248 && event.value != 1472347 && event.value != 1476246 && event.value != 1476254 && event.value != 1472833) { app.alert("NOTE: You must enter a pre-approved number.", 3); event.rc = false;}Notice how each number begins with 147. What I'm wondering is if I can use a variable to replace 147, thereby reducing
Hi all,I am trying to get fields to auto-populate based on selections from multiple drop down boxes. I currently have used things to auto-populate based off of a single drop down selection using the below script:var f = this.getField("Dropdown1"); if (f.valueAsString=="Option 1") event.value = "Text 1"; else if (f.valueAsString=="Option 2") event.value = "Text 2"; else if (f.valueAsString=="Option 3") event.value = "Text 3"; else event.value = "Default text"; However I want to set it up so that certain options come up if selections from multiple fields are true. Example would be:Drop-Down 1; selection 1 and drop-down 2; selection 1 gives you response 1Drop-Down 1; selection 2 and drop-down 2; selection 1 gives you response 2Drop-Down 1; selection 1 and drop-down 2; selection 2 gives you response 3Drop-Down 1; selection 2 and drop-down 2; selection 2 gives you response 4Is this possible?Thanks.
I'm creating an Adobe Acrobat Pro DC form using an excel spreadsheet as a template. My excel formula is IF(Productivity=0,,Total/Productivity*8)I can't get the "if else" formula to work in Javascript.
Hey everyone,I have a form with a text field "Total". I'd like "Total" to be revealed if any one of ten other text fields are filled in. So if all ten fields are blank, "Total" is hidden. If any one of "Price_PP_1", "Price_PP_2", "Price_PP_3", "Price_PP_4", "Price_PP_5", "Price_PP_6", "Price_PP_7", "Price_PP_8", "Price_PP_9", or "Price_PP_10" are filled in with any info at all, "Total" shows itself.It seems like it should be simple. I just don't know how to write the custom calculation script that basically tells it, "If this or this or this or this or this happens, show it. If none of it happens, don't show it."Can anyone help?
I have pdf with a hundred of pages i need to delete that contain "Wrong-File" word and following with one page after the "Wrong-File" page,So if my pdf found 1000 pages contain "Wrong-File" word there are 2000 pages i need to delete, because after the "Wrong-File" page there are one page (the attachment of "Wrong-File" page") i need to deleteNote here : the attachment or the page after the "Wrong-File" page have no same spesific word, so i can't search the attachment and delete them.
Hello, I need some help with a document I'm working on. I'm very much a novice when it comes to javascript and I can't seem to figure this one out. Essentially I need to combine three fields and then add sequential numbering to the end so that each print would be increase numerically by 1. Users would enter values into field#1, field#2 and field#3.For example, field #1 would be two characters (AB), field #2 would be a sequence of six numbers (such as 050418), field #3 would be some other characters (CD). At the end of the string, I'm looking to add sequential numbering, starting at 0001 and increasing by 1 for each printout.The final result would be something like this: AB050418CD0001The next printouts would be AB050418CD0002, AB050418CD0003, AB050418CD0004, etc...I would typically end up printing a couple thousand of these hence the four spaces for the numbers.It just makes it look more consistent but I can live without the four spaces if it isn't possible.Also, it doesn't need to sav
Hello Adobe friends,I have now gotten help with my Javasripts I needed and they work.I do have a small adjustment I need to have done with your help.one of my boxes is a "OK" button and I run a Javascript on it so that my users can attach a file, and the file name is listed, I guess as a comment, in a text box I have namned "lst1". What I need is so that I can click on the listed name and it opens the attachment.Meaning that the field that lists the name of the attachment, in my case "lst1", should always link to whatever attachment the user will attach. Is that even possible? Here is my JavaScript as it is now:try { this.syncAnnotScan(); var a = this.getAnnot(0, "Attachment1"); if (a!=null) { a.destroy(); } var annot = this.addAnnot({ page: 0, type: "FileAttachment", point: [500, 500],
Hello Guys,I need help with my 2 buttons I have created in a PDF-form so that the person filling the for can Attach a file from his Browser and the file name will be visible in another field. However I need one more button so that it "Clears" the attached files.This is my JavaScript that works for attaching a file and so that the file name is shown:try { var annot = this.addAnnot({ page: 0, type: "FileAttachment", point: [500, 500], noView: true, author: "Attachment" }); annot.cAttachmentPath; var attachmentObj = annot.attachment; if (attachmentObj !== null) { app.alert("Add this file: " + attachmentObj.name);  
i want to design a pdf form with functionality to attach files and further encrypt/digitally sign it. i want to do it programmatically through javascripts or adobe APIs. i know there are 'security' and 'securityHandler' objects in this regard. kindly help that what i need to do it? Acrobat DC pro is enough or i will have to buy the adobe library also for this task. And what is the role of Acrobat SDK in this??
Hello,I have been attempting to modify the paragraph spacing of a rich text field in my pdf with no luck, and I'm wondering if it's even possible.Using the spans object, I can easily modify the linespacing, alignment, etc.I have a Visual Basic application that dynamically batch builds company pdf documents for the client. However, for one particular document they are requiring the spacing of the field to be more specific, which requires me to adjust the "above/below" paragraph spacing of the rich text and not just the exact linespacing.On a separate pdf file, I have tried enumerating all of the rich text properties of a field that I've manually made these modifications to, like so:var f = this.getField("Text1");var spans = f.richValue;for ( var i = 0; i < spans.length; i++ ){ for ( var key in spans ){ app.alert(key + " : " + spans[key]); }}But none of the properties it returns match
Hi. Currently I am a starter on the Acrobat SDK and going through all the sample codes.When I try to run the CommonInterfaceAIR.air SnippetRunner I get the following error message from Adobe Air.The application could not be installed because the installer file is damaged. Try obtaining a new installer file from the application author.Any ideas?
Please help with how to best to do this.Once I scan in a previously scratched lottery ticket into a PDF format. How can I? 1. Have the software recognize the numbers only in a specified area. Ideally, only a small box.2. Have the software identity matching numbers. Thanks,Blind Lottery Player.
Hi ! i am working with acrobat DC (15) on Windows.thanks to : Spawn a page using drop down box (JavaScript) , i am able to spawn a template.I have a dropdown list with 3 choices (A,B and C) and a button submit ( the code from the topic are inside this button) and then i spwan a template.However, i would like to delete the template if the user change his choice from A to B ...i konw how to delete a page : {this.deletePages(1)} but where i could apply it ???Thxxxxxxx !!!
My company wants to use PDF as the viewer formats of 3D and 2D, like 3D / 2D PDF into our application.So, I was trying to get SDK toolkit for them, but it seems it's not that easy to find it out.Is there anyone using sdk for 3d or 2d? Or knowing download or manual links?Any comment will be very helpful!! Thanks!!
Hi Friends.Now i found using the following code is more easy than Regular Reset Form for Particular Fields (16 Groups) of Checkboxes., this code working very well form any Button or Document javascript as function, but it really looks crazy! function ClearComboBoxes(){//Remove CheckBoxes Avar CurrentFieldArray= new Array();for (var i=1;i<=20;i++)CurrentFieldArray = "A"+i;this.resetForm(CurrentFieldArray);//Remove CheckBoxes Bvar CurrentFieldArray= new Array();for (var i=1;i<=20;i++)CurrentFieldArray = "B"+i;this.resetForm(CurrentFieldArray);//Remove CheckBoxes Cvar CurrentFieldArray= new Array();for (var i=1;i<=20;i++)CurrentFieldArray = "C"+i;this.resetForm(CurrentFieldArray);//Remove CheckBoxes Dvar CurrentFieldArray= new Array();for (var i=1;i<=20;i++)CurrentFieldArray = "D"+i;this.resetForm(CurrentFieldArray);//Remove CheckBoxes Evar CurrentFieldArray= new Array();for (var i=1;i<=20;i++)CurrentFieldArray = "E"+i;this.resetForm(CurrentFieldArray);//Remove CheckBoxes F
Hi.I know how to populate several fields from data stored in an attachment when an user select an item in a dropdown list.Now I need to populate several fields from an attchment but user must not choose in a list, he must enter his ID in a text field, and other fields must be populated accordingly to the input.Is it possible?How?
Hey there, I need help with a JS-Code.I have two fields in my PDF-Formular one (date of employment) which is edited dd.mm.yyy one Dropdown with 3 or 6 (months)Now I like to calculate means to add to the date of employment.Can somone send me the right Code?THXBjörn
I'm trying to add one or more months to a date field, but I'm running into an issue with the end of the month. If "today" is 01/31/2018, and I add one month, I would like the result to be 02/29/2018, but instead I get 03/03/2018.Is there a way to calculate this, check to see if the date matches, and if it doesn't, set the date at the end of the previous month? In my example, 31!=3, so set the date at 02/29/2018 instead of 03/03/2018.Here's the script that I'm using:todayString = this.getField("today").valueAsString;var months = Number(this.getField("months").valueAsString);if (todayString=="" || months==0) event.value = "";else { var d = util.scand("dd.mm.yyyy", startDateString); d.setMonth(d.getMonth()+months); event.value = util.printd("dd.mm.yyyy", d);}
Hey everyone,I would like to write a script that reveals a field only if an employee puts a particular date range in 2 fields.Basically, there is Date_Field_1 and Date_Field_2. If an employee puts in a date range between the two which is shorter than 3 days, I'd like a certain field to show up. If they put in a date range between the two which is longer than 3 days, I'd like the field to be hidden.I can reverse engineer scripts alright, I guess. But I have no idea how to write them on my own from scratch. Can anyone help?
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
Vous avez déjà un compte d'utilisateur ? Connexion
Pas encore de compte ? Créer un compte
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.