Unlock the power of Acrobat SDK through our community.
Recently active
I'm trying to set up a form so that four text fields will populate with data from a previously user entered field (separate text in each text field) at the same time. Below is a screenshot of the fields that I am looking to populate when "Sole-Trader" is selected from the "employment_type1" dropdown list: When the dropdown list is set to "Sole-Trader", the data for fields "undefined_68, 70, 72 & 74" is to come from the following fields, which have been completed earlier in the document. I have reviewed the existing threads and can find the following script, which I have attempted to modify, but to no avail: var v1 = this.getField("employment_type1").valueAsString; if (v1=="Sole-Trader") undefined_66 = ("residential_address_1"); else event.value = ""; Any guidance would be greatly appreciated.
Hello, I am a beginner. I have a value that is a weight in "kg" to be entered on the PDF form I want a checkbox or a radio button to be ticked automatically depending on 3 ranges of the weight entered:<1kg1-3kg >3kgI would appreciate it if you could help me to script that, and where to enter this script? Thanks(if the weight entered in the form is 2.5kg for example, only the second radio button should appear automatically)Thanks
Hi,I have field1 and 2. I have app.alert if both fields are 0 I get app.alert,but if only 1 is not 0 alert shouldn't pop.I'm getting alert until both field are not 0. How do i fix it?if(this.getField("field1").value == 0 || this.getField("field2").value == 0 ) {app.alert("Field1 or field2 need value greater then 0.");}
I am new to developing with Acrobat. We recently purchased Acrobat PRO DC nad my goal is to create an application to create "full text catalog' (PDX file set) without having to manually do it through Acrobat. My client deals with large PDF files and sometimes takes over an hour to index. The hope is my app can lauch and index the file before the client gets into work. I have made several posts in this forum and have learned a few things - at this point I am starting to believe that I am not able to create this PDX file set from scratch - there are tools to update and rebuild it but not create it from scratch. First question is can someone confirm for me that the "full text catalog" can only bre created manually through Acrobat? In my latest research with the "javascript for acrobat" documents I came across a javascript object "catalogjob" that looks like it might do what I am looking to do. Any information / examples out there using "catalogjob"? I don't have much exp
I'm running a simple document level function to send an email as part of a action. Everything works fine, but I was wondering if anybody has used a javascript to generate a file link, or hyperlink in the message body. I'm using app.mailMsg().
Can someone pls help me. I'm trying to create dialog box but I got stuck at checkboxes and don't know how to proceed, I have lookedonline for examples but still can't figure it out.What i want is if checkbox is checked and when ok button is pressed to target specific field,(example: ckb1 is checked and when ok button pressed field "text1" get value of 10, if ckb2 is checked "text1" get value 20...etc)(I won't be checking both at the same time so it doesn't matter what happen if both are checked at the same time.)I'm not asking for code just explanation or example how to do it. Thanks
In PDF form, Java script for inserting dynamic stamp "Received" or "Approved" along with default author, date etc.. I have created a PDF Form button, when the button is clicked, the "Received" stamp from Dynamic stamp annotation to be inserted in the particular position. Please, let me know the java script for this action.
Found this awesome bit of code to create a single pdf file from a given folder, but i can't get it to create bookmarks when inserting.In the Acrobat and PDF Library API Reference: InsertPages(long nInsertPageAfter, LPDISPATCH iPDDocSource,long nStartPage, long nNumPages, long bBookmarks) For bBookMarks - If a positive number, bookmarks are copied from the source document. If 0, they are not.I found the i have tried all of these options:PartDocs(0).InsertPages(n - 1, PartDocs(i), 0, Ni, True)PartDocs(0).InsertPages(n - 1, PartDocs(i), 0, Ni, 1)PartDocs(0).InsertPages(n - 1, PartDocs(i), 0, Ni, -1)What am i missing? any help would be greatly appreciated.Private Sub Command75_Click()On Error GoTo Err_Command75_Click Const DestFile As String = "MergedFile.pdf" ' <-- change to suit Dim MyPath As String, MyFiles As String Dim a() As String, i As Long, f As String
Maybe I'm expecting too much but was wondering if pdfs and javascript would be able to do this.I have a form that I would like to have it do the following.Do a "save as" to a specific folder using the date from the date field and name from the name fieldAfter saving to the specific folder with the new name, this new form would be flattenedThe submit button to this new form would be removed This may not even be possible but I thought I'd ask. Thanks!
1. How to use "else" without if?example:var sum1 = this.getField("field1").value;var sum2 = this.getField("field2").value;var total = sum1+sum2;event.value = total;else event.value = ""; 2. In custom dialog box how to make "cancel" or "other" button do the same as "ok" button?example: commit: function(dialog){var data = dialog.store();this.strName = data["usnm"];},butn: function(dialog){this.strName = data["usnm"];},but it does nothing.if I set it like this:butn: function(dialog){dialog.end("butn");then it works, but I want it to do same as "ok" button.
I'm creating a form to extract pages but i'm having some trouble with it. The page range form fields are called s1s and s1e but the error is saying that its an invalid range. Can anyone help?Code:function extract(){var job = this.getField("jN").valueAsString;if(this.getField("s1s").valueAsString!=="" && this.getField("s1e").valueAsString!==""){var s1s = Number(this.getField("s1s").valueAsString);var s1e = Number(this.getField("s1e").valueAsString);this.extractPages(s1s,s1e, job + "-1.pdf");}}
Hi All, I've been attempting to use a dialog box to add two new cases within my PDF form on Adobe Acrobat Pro DC. I used Javascript customize the inputs and have tested it using the debugger. However, it will not let me access/use the data passed in the box or add it to the form itself. Here's the simple dialog box:Two cases: observations and references.Click Okay Now I want that data to automatically load onto the page. How can I implement a functional dialog box like that for my user? Thanks for the help in advance. I'm new to this and I want to make the user experience as easy as I can.
Looking for a Document level script and Field level script that will ignore blanks in the average but will count 0s in the average. I have several fields for subaverages and a cumulaitve average. I have been using these two scripts to ignore blanks but now they want the 0s in the averages. Any suggestions would help! function calcAverage(fields, ignoreBlanks) {var total = "";var n = "";for (var i in fields) {var f = this.getField(fields[i]);if (f==null) {console.println("Error! Can't locate a field called: " + fields[i]);continue;}if (f.valueAsString=="" && ignoreBlanks) continue;total+=Number(f.valueAsString);n++;}if (n=="") event.value = "";else event.value = total/n;} calcAverage(["PLO_1_a", "PLO_1_b", "PLO_1_c", "PLO_1_d", "PLO_1_e"], true, true);
Hello. I'm trying to have two fields in Acrobat automatically calculate based off two other fields filled in by the employee for our employee bill back form. The employee will fill in the field Total Hours and the field AmountHr (amount per hour). I then need the field named Bill Back Monies NMI to calculate what 25% of Total Hours*Amount/Hr is, and another field called Total Bill Back Monies Emp to calculate what 75% is. I know this sounds simple, but I've never written formulas/script in Acrobat.
Hi everyone,In Acrobat DC I created a custom Tool, containing some custom Actions: Now I want to share the Tool in my company. So I exported it to a TestTool.aaui and the Action to TestAction.sequ. When I import the Tool and Action files afterwards on a new computer, the Tool doesn't contain the Action:I still have to assign the Action to the Tool manually on every single computer (this is not very handy).How do I allow users to simply install the Toolbox, already containing all of the new Actions, without having the users to configure it themselves?Thanks for your help!Regards.
Hi everyone,Is it possible to restrict editing of a pdf with a permission password in javascript?Is it also possible to set the password security settings in javascript? (printing allowed, changes not ... etc.)Regards.
Hello everyone,I am trying to create a form with three drop down lists. With the last drop down list giving me different information based on the first two drop down selections. Is it even possible? For example, the first drop down is "grades" with options: 9, 10, 11, and 12. The second drop down is the "subjects" English or History. The third drop down "Standards" should give me the proper information based on the previous two drop down selections. For example, 10th grade history should give me some drop down options like: H10.1, H10.2, and H10.3 and 9th grade English should give me drop down options like: E9.1, E9.2, and E9.3. Thank you in advance for any guidance. P.S. I am using Adobe Acrobat DC
I need help with sorting of a created portfolio in Visual Basic 6 with JavaScript and Acrobat Pro DC. I can create successfully a portfolio with some entries. I want to sort these entries by a specific sort order. I tried this by entering a sorting code into the description field as a workaround. This works. But only if I manually change the sort order at the portfolio: Dim AcrobatApp As Object 'Acrobat.CAcroApp Dim AcrobatDoc As Object 'Acrobat.CAcroPDDoc Dim jso As Object Dim Collection As Object Set AcrobatApp = CreateObject("AcroExch.App") Set AcrobatDoc = CreateObject("AcroExch.PDDoc") AcrobatApp.Hide Set jso = AcrobatDoc.GetJSObject Set Collection = jso.App.newcollection() Collection.addField "index", "0", "S", 3 Collection.importdataobject("readme", "/c/Test/readme") jso.ResetAttachmentDescription Collection, "readme") Set varAttachment = Collection.getDataObject("readme") Debug.Print varAttachment.Name & ", " & varAttachment.path & ", " & va
Hello All,thaks for your help! I have question regarding Digitial Signature, I create a custom script for the Digital Siganure and it's working fine, but I'm passing the null user name and Passoword/ wrong password it open the above page, is there any way we can hide this or disable it.I'm using the below box to pass the user name and passoword.
I want to enter a time in a field, but I want the system to automatically put in the colon. Example: I enter 830 and the system enters 8:30
I tried everything I can think of and just can't get this to work.In my "field1" validate tab I use this custom codeif(event.value > 0){event.target.textColor = color.blue;}else if(event.value < 0){event.target.textColor = color.red;}else if(event.value == 0){event.target.textColor = color.white;}field1 get it's value from another field. I want it to show if 0= white, if bigger then 0=blue, if lower then 0=red but the colors are mixed up,for example if number is 5 it should be blue but is white, 0 is red and -2 is blue but in field properties it shows correct color ( example in the field1 value is 5 it show white color but in properties it's blue) .If I enter value manually it doesn't change colors at all.
If I use this code for example AFNumber_Format(2, 0, 0, 0, "$", true); how can i get currency to show on right side of value? also can it have 2 currency symbol one on the left, and one on the right?
HiI have a pdf that contains dropdown menu for type of ID document. In my example, the dropdown option is 'passport'. I want to then create a script that will add my total number of 'crew' if the fields contain the 'passport' dropdown. Ie if I select 'passport' on a row, then automatically the total crew is 1. On next row, if i add 'passport' again, totla crew is now 2. If Passport is not selected on a row then it doesnt add that as a person. The drop down has to be selected to 'Passport' for it to register a person and then add it from each row if selected.
Total nubie here with no knowledge of javascript yet. I have one last item I need to complete a form I am working on. I need to take the amounts of two fields and check it against a drop down menu of Yes or No to determine if the items should be taxed 6%. The formula someone provided to me didn't work. It was:var a = this.getField("Item3_Amt").value; var b = this.getField("Item4Amt").value; var c = this.getField("Dropdown").value; if(c == "No"){event.value = "$0.00"; }else event.value = (a+b)*0.6; Unfortunately it doesn't work. Can anyone tell me what the problem might be?Also, after looking at the form a bit more I think it would work better to replace the dropdown with a check box. So what would a working formula look like with a checkbox instead of the dropdown.For you guys with the knowledge, your awesome! Thanks
Hi,I require some help regarding JS in Acrobat DC.I've been looking in every document and every corner of the internet and I just can't seem to find what I need.What I require is to programically get the format currently applied to a text field, (for example, none, number, percentage, etc.).To be clear, I do not need to know what type of data would currently be in the field's .value, as it can have nothing at all at that moment.What I need to know is what that field is currently formatted for (Properties > Format).Also, yes, I know you can just apply the right format to that field programmically likeAFNumber_Format(2, 0, 0, 0, "", true);That is also not what I want. I want to apply further code on the field only if it is configured for a wrong date or number format. And for that I need to know what format it has beforehand.I'm trying to develop scripts to automatically detect wrong formats being applied to certain fields in large files, please help me out if you have any clue.
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.