Unlock the power of Acrobat SDK through our community.
Recently active
Folks, Does any one have a sample javascript code which1. Ask user to click a text field.2. Script get the name of the text field which user clicked.3. Input something into the text field. Thank you for your help.--AL
Acrobat Pro DC on a MAC running OS X 10.11.6I have a form that is mainly set up in Indesign (it works for us - I know others prefer to set forms up purely in Acrobat).I have a script I can run via Action Wizard (execute a javascript) to change the font in all the text form fields. But being a script-novice I can't figure out how to create a similar script which will change the font used by Combo Boxes (created in Indesign). Can this be done by a script?I know I can do it manually via Properties but if anyone can give me a pointer to figure out how to do it with a script that would be amazing!Thank you
Is there a way to get the name of the own field itself where the code is written, in the code that writes in the field? For example, if I have a field named "ABC". var x = this.getField ("ABC"); event.value = x.name;It will be "ABC", Is there a way to avoid to writing own field name ? var x = this.getField ("ABC") ;
It's actually a little more complicated than the subject line implies.Making an interactive PDF form.Can get a short text string to appear or a short text field, using mouse enter action to display a text field.However, it only dispalys a part of the text in the field and there is no formating.I would like/need to include in my pdf intructions that will pop up when mouse enter (hover) over a hidden button. The instructions are usually 6-12 lines long and being able to format them, even just to bold the step numbers in the list, would be good, as well as control the font type and size. I can't think of how to do this except with a mouse enter action that runs a Javascript. I'm willing to do that, but have no idea the script commands to use (and not finding them on-line). Can someone provide an example script or point me to a free informational resource?
I am a complete newbie to JavaScript and this is my first post. With the help of various snippets of script I have found on the web and Thom Parker's book "all about pdf stamps" I have created a custom dialogue to populate several text fields and tick boxes of a dynamic stamp. The stamp works well but it could be better. I would like the input fields on the custom dialogue to display default values rather than blank white space. I can get one field to display as I would like, but only the last of 7 fields does this. If I copy what I did in field 7 to the others it doesn't work for the others but field 7 does work. Can you help? I have 7 lines like this:strField1: "", initialize: function(dialog) {dialog.load({"fld1":this.strField1});},These lines are repeated with strField1 and fld1 replaced by strField2 to strField7 and fld2 to fld7 followed by the following script:commit:function(dialog) {var data=dialog.store();this.strField1=data["fld1"];Again this is repeated for the ot
Hi there!I'm looking into removing specific bookmarks (repeated) from a bulk invoice PDF which is generated by our e-commerce platform automatically (300 invoices in one PDF file). As you see there are two top level bookmarks in each invoice, I'm trying to figure how to remove all the "Ordered products" bookmarks with a script, so that I could use the Split function to split all 300 invoices by Top Level of Bookmarks. I know: this.bookmarkRoot.remove(); would remove everythingand I have tried:this.bookmarkRoot.remove("Ordered products"); which did not work Anyone could please help me the novice here ? 🙂 Thank you so much in advance!
Hi,I got this script of calculation of time on this community and i modified it to suit my form everything is working fine.. but when i reset the form .. everything should be blank or 0 but the calculated field still keeps the last calculated value; Here is the script (run through calculate tab): var cStartDate = this.getField("Date").valueAsString; var cStartTime1 = this.getField("IN_TIME1").valueAsString; var cStartDateFormat = "dd-mmm-yyyy"; var cStartTimeFormat = "h:MM tt"; cStartTime1 = AdjustMidnight(cStartTime1); var cEndDate = this.getField("Date").valueAsString; var cEndTime1 = this.getField("OUT_TIME1").valueAsString; var cEndDateFormat = "dd-mmm-yyyy"; var cEndTimeFormat = "h:MM tt"; cEndTime1 = AdjustMidnight(cEndTime1); event.value = 0; if(cStartDate != "" && cStartTime1 != "" && cEndDate != "" && cEndTime1 != "") { var t1 = DateTime2Min(cEndDateFormat + " " + cEndTimeFormat, cEndDate + " " + cEndTime1) - DateTime
I have the below on a form and I need a JS to make the following possible please:If a term of 2 years or over is entered, I need tick box A to be ticked and the adjacent monetary field to be openIf a term of under 2 years is entered, tick box B needs to be ticked and its two field to be live while A is 'shut'but... regardless of the term entered, the customer could chose 'additional customisation' in which case both A, B and C need to be ticked and the fields open. Thank you!
Please and please i need help getting my following attached adobe form on my PC to generate new sequential serial numbers on the specified "Ticket Number" field on the form during each print. I print lots of copies of this template, during the production, i want the form to be able to generate serial numbers on the specific field just like the illustration attached. say i send 1,000 copies of the form to print, the numbers should be generated accordingly till the last copy.Please i will appreciate any support to this request. Thanks
Hello, i am hoping somone might be able to help me. I am trying to do an if then statement to creat a action to change the content of a text box by clincking on a specific value of a drop down list. I don't understand why it doesn't work. Thank you.
To format a PDF document to properly have a Gutter I ahve to do a Manual Process. I was looking to Automate this using VBA in Excel. I have the Doument Open and Can get page #'s but API is not clear from there on how to rezise and Crop pages I print document 7.75" x 11 I open PDFI Click CropI Chnage Page Size(X) Custom Width 9.25, Height 11(X) Center, XOffset .75"(X) All Then I go back in to Crop(X) All Pages(X) Odd OnlyRight .75OK Then I go back in to Crop(X) All Pages(X) Even OnlyLeft .75OK What i get is an 8.5x11 Document with a .75" Gutter for hole punching when printed double sided
I'm trying to create a format for a field in my PDF. Custom Format Script:event.value="/" +event.value + "/"; Custom Keystroke Script:event.rc = /^[A-Z]*$/.test(event.change); I'm hoping the outcome that the what ever is entered in this field starts with "/" and ends "/". - when testing for e-sign, it did not warn the signor to use the "/" and "/" and they were able to move to hte next field and sign the document. How can build this script to make it a requirement?
the image exported from latest Acrobat pro DC, how can i nake the image from imagenagick (other program) to get image as long as the same image?pls any help. thank you
I am trying to do an IF THEN Calculation in PDF Form. This is beyond my expertise with PDF. There are 3 fields. A1, B1, C1. If A1 is greater than B1, then calculate A1-B1 =C1. If A1 is less than B1 then C1 would equals 0. For example.A1 =24B1 =20C1=4 orA1=19B1 =20C1= 0 Can anyone help with this? Thank you
I am creating a C++ plugin where I want to secure and open a PDF file. The plugin will be creating will be a Adobe secured PDF, which only the plugin will be knowing the password to open and modify the security parameters of the PDF. This being the case, The plugin also controls the permissions of the file while opening the document using the VDocPermReqProc permReqProc, I need to modify the following things.The "security settings" displays the set of permissions based on the PDF file and not based on what permissions are allowed as part of the callback for the permReqProc. I need to modify this.Also, there is an option in the "Security settings" to change the security method, which prompts for user password. I need to either disable this button or change the behavior to say changing the security method is not allowed as the user will not be knowing the password. The hint I got from running through the SDK APIs is that I might be able to do this using a different P
I am creating a plugin where it creates and opens a secured PDF file. As part of opening the secured PDF file I am using AVDocOpenFromPDDocWithParams and specifying callback for the permissions. The other options for disabling the print and save, seems to work fine as part of the callback. However, I am unable to disable the email button by denying "'PDPermReqOprUIemail'' as per the logs this particular permission was never requested. Is this feature broken or am I doing something wrong? On similar lines, starring this document is also uploading this document to the cloud, how can this also be disbaled? Thanks in advance. params.usePermReqProc = true; params.permReqProc = pPermReqCallback; PermReqCallback(AVDoc doc, PDPermReqObj obj, PDPermReqOpr opr) { // Deny permission to enable the email button if (PDPermReqOprUIemail == opr) { return 1; } //Handle other permission request cases.... }  
I have 7 dropdown lists with custom text. I would like to some how populate the selections from these drop down lists (with the custom text) into a single text field in a list format. However would it be possible to exclude certain drop down list selections from being populated into the text field. Each drop down list has the following slections:" ", "N/A", "C1", "C2", "C3"When either "C1", "C2", "C3" are selected. I would like this to be copied into the text field along with the custom text.When either " " or "N/A" are selected. I would like these not to be populated into the text field.My Javascript knowledge is very limited so any info would be greatly appreciated.
Hi community, I am trying to redact my pdf using the following method, this.addAnnot({type: "Redact",page: myPage,quads: myQuads}); It can successfully white out the area that I want it to be redacted. But I wonder, is there any properties that can be used to color the area instead of white it out? Or can someone please share the related API document? Thanks:-)
Hi everyone! I'm not too hopeful about this one, but is there a way to retrieve a list of installed fonts available for use in Acrobat via JavaScript? Something similar to app.fonts in Extendscript? I know this can probably be done with a Java library like PDFBox, but I wanted to make sure there's no way to achieve this with JavaScript before I go down that wormhole. I realize this might not be possible though. Any push in the right direction is greatly appreciated. Thanks so much!
Hi, I hope you all are well and safe at this strange times.I am working in a form with a lot of fields to fill. Once it is filled the user should click a button to send the entire pdf form attached in an new outlook mail to an email address.I´ve been searchig the way to do that but the action buttons do not support a "send email" action, but they do accept javascript.Could you help me with a javascript code to do that? Many thanks and Regards Joan
I am currently building a scoring chart that can hold a max of 100 people. Each person is then graded on up to 8 criteria fields for a total score. However, when I used the built-in sum formula, it made my form lag and take around 10 seconds to click between boxes. So now I am looking into creating a button that once the form is filled out, the user can click the button to then calculate the sums of the 100 candidates' scores. So first of all, is this possible to create and will it help remove the lag? The list of boxes that need to be added for the first candidate are 11, 21, 31, 41, 51, 61, 71, and 81. Then the second candidate has 12, 22, 32, 42, 52, 62, 72, and 82. This goes on until the 100th candidate who has the boxes 1100, 2100, 3100, 4100, 5100, 6100, 7100, and 8100. Then the boxes for the sums are titled TotalScore1, TotalScore2, up to TotalScore100 respectively. I was able to figure out how to adjust a script to my needs in a previous form, but I don't know how to
Hi,i use Acrobat XI/Windows.- the methods used are app.trustedFunction. The script generates a pdf doc through the Adobe PDF printer to be used subsequently in the same script, however, despite seeing how it has been stored in the local folder, at runtime app.openDoc () does not recognize it as [doc object]: JavaScript Debugger console returns "Invalid location. The file or folder does not exist". The Adobe PDF printer settings allow you to display or not the printed pdf document. I have tried both ways. When it shows it, I try to select it with app.activeDocs, but it doesn't detect it either. I am being forced to break into two action button scripts with user intervention (so the script works correctly), when I want the process to be completely silent and unattended. I hope my question catches your attention.Thank you.
When using this script I get the error message when I enter in like 3 of the nine numbers I need,But if i do put in the afterward the 9 numbers the error message does not go away it stays. Also I tried using <= this ths a value reference in Javascrpt am I doing this wrongBank_Routing_number is formated as number var cNumString = this.getField("Bank_Routing_Number").valueAsString;if (cNumString < 9) event.value = " ";else event.value = "Bank Routing Number Must be 9 Characters"; Help would be appricated
when i am done filling out a form how do I permanently save it
Hello, Is it possible to type into a field that is set to autogenerate information from a selected checkbox? Example:I have four checkboxes on page one of myy PDF that generate predermined phrases into a field located on page two. I'd like to add an additional field called 'Other'. I want the user to be able to type unrestricted information into the Other field and have the information generated in to the field on page two. Below is the code I've applied to the field on page two. Is there anything I can add to get the desired results? var a="" if (this.getField("CB1").value == "Yes"){a="\u2610 Option One \n"}if (this.getField("CB2").value == "Yes"){a=a + "\u2610 Option Two \n"}if (this.getField("CB3").value == "Yes"){a=a + "\u2610 Option Three \n"}if (this.getField("CB4").value == "Yes"){a=a + "\u2610 Option Four \n"}event.value=a
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.