Unlock the power of Acrobat SDK through our community.
Recently active
I have 13 individual fields on a document that cannot be blank. Due to the way the form is used, I have added a button at the bottom that says 'validate content' and it runs the following when the button is pressed. This works well, but it's obviously checking each field individually and giving separate error messages. How do I get it to check all 13 fields at once and give the error message as one list of empty fields and mark the fields with a coloured border? var patternEmpty = /^\s*$/; var strMissing = ""; if(patternEmpty.test(this.getField("User.USER_EMPLOYEENUMBER").value)) strMissing = "User Employee Number"; else { // All is ok, submit the data console.println("All form data ok"); } if(strMissing.length) {// Got an error app.alert("Missing Form data in field: Code V.1 " + strMissing); } var patternEmpty = /^\s*$/; var strMi
On my template page, I have a field that is a "Page __ of __" field that should auto-populate when the user creates a new template page. The 1st 6 pages of my 12 page file are intro information, and then page 7 is where the first 'add a page' button is, which calls forth the "T1 template", which spawns as page 8. Yet both of these pages have the Page blank of blank.So to illustrate, page 7 starts with Page 1 of 1. When the user hits the 'add a page' and generates page 8, page 7 should be Page 1 of 2, and page 8 should be Page 2 of 2. Then when they hit the button again on the newest page, page 7 should be Page 1 of 3, page 8 should be Page 2 of 3, and page 9 should be Page 3 of 3, and etc etc.So the code I have so far for the "add a page" button on page 7 (and this one seems to be working fine as it's a specific increment with non-changing field names) is:var SpawnPage = this.getTemplate({cName: "T1"});SpawnPage.spawn({nPage: pageNum + 1, bRename: true, bOverlay: false});this.pageNum++
Hi..newbie to the forums as well as javascript in a pdf. I have a pdf with some very specific functionality...One of the pages has a form, with 10 different rows of data that each have their own reset button per line (illustrated below). In addition to that, this same page has a button which is supposed to duplicate this same form page again (with different fieldnames) so the user can enter an additional 10 lines of data, then click that same button to spawn yet another new page if needed, and so on and so on. As shown, each row consists of 7 input boxes, then a 4 option radio button set, then 2 more inputs, then another 6 option radio set. As if that wasn't enough, each of the individual radio button COLUMNS, and the last 2 input field COLUMNS, get tallied and totaled at the bottom, and those 'total' numbers each have to also be carried through (no matter how many of these pages the user spawns), and that total total has to appear on yet ANOTHER page of the file in a 'total total tota
Hello!I want to start off by saying that I have limited to no experience directly with JavaScript, but do have basic programming knowledge of VBA and Java.I am working on automation within an on-boarding document for new employees where the only requirements are:a) When a signature field is signed off on, mark off a check box in the document;b) Display "Not Complete" if all check boxes have not been checked off from a signature;c) Display "Complete" if all check boxes have been checked off;d) If possible, prevent document from being submitted via e-mail until the document is marked as complete.Any help is appreciated. Even getting task "a" working is huge progress!Thanks,Jeff
Hi, I have one pages PDF form & i want to make 100 duplicates with unique field names. looks like bellow button code will work but i want to do it in once click. also after making 100 pages, i want to delete the buttons. anybody can help me to do it ??. thanks..this.spawnPageFromTemplate("GMFT");
I have 2 ButtonsThe first Button is called "UPS ON0.0" with the choices "ON" and "OFF" and I want it to be seen at all timesWhen Button is in the "OFF" position I want to hide the second button.The second button is called "UPS IN0.0" with choices "INVERTER" and BYPASS"When first button is "ON" I want the second button to show.Please help me. I have very very basic programming skills and am trying to build a form for my team taking rounds
I'm trying to figure out how to have one drop down menu's options affected by another drop down menu's options.So for example Box A drop down has options 1, 2, 3, 4If I choose option 1 I want box B drop down to have options Red and blue, but if I choose option 2 I want the box B drop down to have Green and yellow.I cannot remember what options to choose if anything, and need help figuring out what properties I need to change, or how to edit the script.
var f = this.addField("myfield","text",0,[0,792,126,770]); f.borderColor = color.black; f.textSize=12; f.textColor=color.black;It works fine but positions the text field in the top corner of the page, whereas with LiveCycle it was simple to make a new field below an existing one, then another each time the button was clicked. Can anyone help me with this please?
Hi I'm creating a form which requires the comparison of two cells to show a cash saving. I would like to change the colour of the text in the savings cells/column based on whether they are equal to or less than zero. The default colour if greater than 0 should be green.I have spent a while trawling the internet for a solution that works and whether the JS info should be in the calculation or in the validation. I have successfully got this calculation working. But cannot for the life of me suss the colour - I got close but alas no cigar.(function () {// Get field values as numbers var v1 = +getField("Competitor1.0").value; var v2 = +getField("OurPrice1.0").value; var v3 = +getField("Quantity1.0").value;// calculate this field value event.value = v3 * (v1 - v2);})();My questions are as follows- How do I create the colour script?- Where should it be used (in the calculation/validation areas)?Any help much appreciated.
I'm trying to store the filepath and filename of several PDFS in an array. I'm using the action wizard and executing the code below.if ( typeof global.zArray == "undefined" ) {global.indexCnt = 0;global.zArray = new Array();}var path2file = this.path;var re = /.*\/|\.pdf$/ig;var filename = path2file.replace(re,"");var filepath = path2file;global.zArray[global.indexCnt] = [filepath,filename];global.indexCnt++;I tried viewing all the elements in the array after all the files processed using the code below, but it only prints the last filepath and filename in the folder.for (i=0;i<global.zArray.length;i++){console.println(global.zArray);}What am I doing wrong??
I have an array of objects that need to be persistent. I have read that saving complex data can't be done as is but can be saved if in a string format. Any help in this area will be greatly appreciated. Also is there a special location to make this data persistent ie: global.setPersistent()?
Hi, is there a way to set fields to be required field and have the user fill out the required field before moving on to next field?
Hi all, I have a simple script that flattens a page. It works well. I just want to add a command so that the document saves once the page has been flatten:function Flatten(boolCurrentPageOnly) // Takes a boolean argument{if (boolCurrentPageOnly) // Flatten either this page... { this.flattenPages(this.pageNum); app.execMenuItem("Save") //That's where I inserted the new command. All works fine otherwise. Except that it doesn't save the doc. }else { this.flattenPages(); &
I am trying to find a script that will delete all spawned pages, regardless of the number of pages. I want to be able to set the document back to original. The number of spawned pages may vary.
I have a program I am writing that has parts that interact with acrobat. When a user that does not have acrobat is running the program on their machine it crashes when they try to access a form that imports the acrobat libraries. Is there a way to check for acrobat and display a message to the user if they do not have acrobat?
I entered the script below which works but not perfectly. If COT or POT is picked from the drop down list I want the WO text field to be blank, which it does. If 'Vacation' is picked the WO number "3071070" populates to the text field. The problem is if the user changes their mind from Vacation to COT the WO number does not disappear. Is there something I can put in the quotes to tell it I actually want a blank text field? Thank you!!// Place Absence Data into Pay Type Description and WO Fieldsvar AbsenceData = { "Vacation":{WO: "3071070",PayTypeDesc: "Vacation" }, "COT":{ WO: "", PayTypeDesc: "COT" }, "POT":{ WO: "",PayTypeDesc: "POT" }, "Stat Holiday":{ WO: "3071070",PayTypeDesc: "Stat Holiday" }, "Sick":{ WO: "3071080",PayTypeDesc: "Sick" }, "Family Sick":{ WO: "3071080",PayTypeDesc: "Family Sick" }, "Sick No Pay":{ WO: "3071080",PayTypeDesc: "Sick No Pay" },
Guys, I have a pretty simple question, but I've no idea about writing command in JS.The thing I'm trying to do is to print in a textbox the last five digits of another textbox. Something like this:in my first textbox, I have this serial number: FTFYIOI66779995, and I want to print the last 5 digits: 79995 in other textbox.Hope I explained myself right And thanks for your help
I'm still a little new to PDF javascripting. Is there a javascript to insert another pdf file into an existing PDF file when a user chooses a drop down menu item?I have a template with a drop down menu, and when a user clicks on that menu item I would love for the corresponding PDF be inserted into that template. Would that be possible or would that be too difficult? I am using adobe acrobat pro DC. Thank you in advance!
Guten Tag liebe UsersGerne möchte ich mehrere Dateien mit einem Javascript an den Drucker senden. Vorher aber den Druckmanager anzeigen lassen, damit ich die Papierauswahl anwählen kann.Für eine Hilfe danke ich im Voraus.Freundliche Grüsse
I have a Button that on click populates a Package one of the the JS that I am using is causing me headaches though.I have an if statement that checks if a radio button value then depending on the value is supposed to copy the value of a hidden field containing multiple lines of text to another field. Unfortunately the button click sets the value of the Field to object Field.if (this.getField("Pac.Comp").value == "DMV") {this.getField("Form.PG5Remarks2").value = this.getField("PG5StatementFem").value};Form.PG5Remarks has the "object Field" instead of the statement.Thanks for any assistance.
Hello all,I want to create a file with text fields that expand, when the field is full. Sadly the posibility to minimize the characters is not an option.Furthermore I am looking for an option to expand a table when a 2nd, 3rd .... line is needed. So far it feels like I searched half of the internet but I just cannot find a solution. I would be really greatful if someone has an idea or a link that would bring me close to a solution.Thanks!
Questions :1. Do you have a car? - available answers are - O Yes or O NoIf answered yes, a value of $100 needs to be assigned, if no, then zero assigned2. Do you have a bike? - available answers are - O Yes or O NoIf answered yes, a value of $100 needs to be assigned, if no, then zero assignedAt the end I need the form to tally the total amount based on the answers. Is this possible with adobe/adobe sign? Thanks
Hi, I have a pdf document that contains images which are digitised pages from a historic hand-written text. The text cannot be OCR'd. We have manually transcribed the text so I have it available to add into the document, but I want to do this a) automatically (I have potentially about 15 of these volumes, each with ca 600 pages); and b) so that it doesn't appear for people looking at the document but it does allow them to search and navigate directly to pages that a given words occurs on.Currently I have this script (obviously I'll loop round pages and possibly read the text for each in from a file, but this is just to illustrate one page):var f = this.addField("Page1Text","text",0,[10,10,500,500]);f.display = display.noView;f.textSize = 0;f.textColor = color.transparent;f.fillColor = color.transparent;f.multiline = true;f.readonly = true;f.value = "1\nSpecimens illustrating Flora Tertiaria Helvetica\nFossil leaves &c Disco\nPetrified woods\nCoals British Columbia H.M.S Plumper\nFo
I am trying to rename the action button using the response given from the "app.response" entry. This value will be used not only to rename the action button but will also be used to fill in a form field on the spawned document.I am using a windows based computer - the code I have written works except I can't figure out how use the variable generated by the user response to change the button label and to be used to populate other fields in the document.// If button is Clicked and the hidden check box is not checked - the Analyzer1 check-off pages will be spawned;var cb2 = this.getField("CB2").value;// Assign Templates to be spawned a variable so they may be recalled;var a1a = this.getTemplate("Analyzer1A");var a1b = this.getTemplate("Analyzer1B");var a1c = this.getTemplate("Analyzer1C");var a1d = this.getTemplate("Analyzer1D"); if (cb2 != "Yes"){var resp1 = app.response(" Enter The Analyzer Serial Number."); if ((resp1 != null)||(resp1 !="")){ this.getField("Anal1").buttonSe
Can English pdf documents be saved or exported to other languages (Italian specifically)?
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.