Unlock the power of Acrobat SDK through our community.
Als letztes aktiv
Hello everyone,I'm fairly new at Javascripting and PDF forms, and I would love some help,I have a list of books with checkboxes which spams for almost 9 hundred items, and I want to count the total number of checkboxes (checked and unchecked); as I have deleted some fields I know that the last numeral isn't the total. So I'd like for a way to calculate it automaticallyI've managed to put this code together:var cntr = 0; for (var i = 0; i <= this.numFields; i++) { var mf = this.getField(this.getNthFieldName(i)); if (mf.type == "checkbox") { cntr++; } }event.value = cntr;However the number thrown is "685", but the last checkbox numeral is 896; and I didn't delete more than 10-15
Hello i'm developing a pdf where the save button will choose for the user the folder and file name. I Know to do this from Try67 tutorials that I will need to put a folder level script. My question is if everything is done in the common drive environment, H drive (all users have access) but programs are not install there but in the local C drive. Where would i put the folder level script to make sure everyone will be able to have the button working when using adobe reader.
I have two text Fields "Account#" and "Zip" that I have made mandatory when checking one of two boxes (COD Or 3rd Party), Now when checking these boxes the Fields "Account#" and "Zip" outline in red to signify these are now required fields. What I'm trying to do is then write a script for the "Account#" and "Zip" fields that then removes that outline once the fields have a value, however I also want these fields to go back to being outlined in red if the value in each field has been removed only if the "3rd Party" or "COD" boxes are still checked. here is the javascript I have written for each checkboxthis.getField("Account#").required = event.target.isBoxChecked(0);this.getField("Zip").required = event.target.isBoxChecked(0);Here is the javascript I have written for each "Account#" and "Zip" field to add/remove the red required borderif(event.value != ""){ event.target.required = false;}else { event.target.required = true;}the problem lies her
Hi all, I'm looking for an answer if something I'm proposing is possible using javascript (or something else entirely). I'm looking to create a PDF form but have 'First name' and 'Surname' fields on the cover, but within the document variable text fields that populate with the 'First name' on other pages. Is this possible, or would this not be javascript at all?So for example:Page 1First name: BeckySurname: SmithPage 3Running header: "<Becky>'s workbook"Page 5Body copy: "<Becky>, here is your chance to answer some questions."Any advice greatly appreciated!
Hi there, Could someone help me correctly write a javascript. What i want to do is get the layers to switch between themselves when another layer is toggled on. So when toggling through the layers they don't all stay on but rather switch between them.This is the script I have so far,var docOCGs = this.getOCGs();for (var x=0; x < docOCGs.length; x++){ if(docOCGs.name == "Layer 1" || docOCGs.name == "Layer 1") { docOCGs.state = !docOCGs.state; }}Thank you.
Hi , I wonder , is there any possible way to write files to the system temporary folder with the help of Acrobat SDK ? If yes , what methods allow do that ?
I have a pdf that contains three fields. One is a text field in which dollar amount is entered, the second is a text field in which a term is entered (i.e., 36, 48, 60) and the last field is the one in which the solved amount will be listed. An example of this formula is if Cost of Licenses >$25,000; multiple the entered amount * .03081 if FinanceTerm = 36.I'm getting the following error message: SyntaxError: syntax error 6: at line 7. I'm very new to multiple options and can't figure out what I'm missing. Any help is appreciated.var A = this.getField("CostofLicenses").value; // the value of field A;var B = this.getField("FinanceTerm").value; // the value of field B;var C = this.getField("MonthlyPayment").value; // the value of field C;event.value = "";if(A>$24,999,B=="36"){event.value=A*.03081};else if(A<$25,000,B=="36"){event.value=A*.03110};else if(A>$24,999,B=="48"){event.value=A*.02383};else if(A<$25,000,B=="48"){event.value=A*.02386};else if(A>$24,999,B=="
Hi all. Need some help if possible. I have a submit button in my form running a Java Script to extract emails associated to checkboxes in that particular form. So this works like this:var fields = ["Checkbox1", "Checkbox2", "Checkbox3", "Checkbox4"]; var addresses = []; for (var i in fields) { var v = this.getField(fields).valueAsString; if (v!="Off") addresses.push(v); } this.mailDoc({cTo: addresses.join(";"), cSubject: "Subject line goes here"});And each checkbox has an email address as export value. This is all working fine. Now with all of this working I'm wondering if there is a chance to do the next:- form has 4 required text fields. I want that user must fill up minimum 2 out of these 4 fields, before Submit button will work. Of course it is allowed to user to fill 3 or even all 4 required text fields and then to submit a form as well. Now I know that there is a validation script for required either text field 1 or 2 to be completed:this.get
HiyaNeed help please.trying to creating a form which has 2 list box and radio button selectionFirst list: 12 Teamsteam 1Team 2team 3....Team 12Then have radio button choice “yes” or “no” of if team member is applying for admin accessbased on first list each team has members who perform rolesSecond list: have 20 different rolesteam 1 can have roles*Standard user *lvl1 support*lvl2 supportteam 2 can have roleslvl2 supportlvl3 supportteam3 can have roles another set of roles.If on form radio button choice is “no” then role assigned will always be “standard”if on form rom radio button choice is “yes” the role are avail for selection based on check of team from first listboxthen enter group name in will be populate in read only text fieldfirst listbox: Teamsradio button choicesecond list box based on roles available to team
There must be a better way of doing this, but it's got me- all help appreciated I'm sure.Back to back printing with a different field on the bottom of the pagesvar pp = this.getPrintParams();pp.DuplexType = pp.constants.duplexTypes.DuplexFlipShortEdge;this.print(pp);//Print Ds COPYgetField("Footer").value = "[ Ds copy ]";this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 0, nEnd: 0, });getField("Footer").value = "[ Ds copy ]";this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 2, nEnd: 2, });getField("Footer").value = "[ Ds copy ]";this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 1, nEnd: 1, });getField("Footer").value = "[ Ds copy ]";this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 3, nEnd: 3, });var pp = this.getPrintParams();pp.DuplexType = pp.constants.duplexTypes.DuplexFlipShortEdge;this.print(pp);//Print POL COPYgetField("Footer").value = "[ Judgement Creditor's Solicitor copy ]";this.print({ bUI: false, bSile
Hi all,I am trying to adapt a JavaScript code provided here and change it to suit my needs. Looking at screenshot below, I need to click on drop-down menu (shown as item number 1), select Other from the listed options, and upon selecting Other, a new textbox to appear at location shown with number 2.Here is my code at which the CreateDialog function does not seem to work:// GLOBAL JAVASCRIPT SECTION FOR CUSTOMIZATIONvar builder = {textBoxes :[{ field:"OtherText", description:"Type it here then:", default:function() { return ""; } }],// This maps to a Popup Group in the PDF named 'Review Type' popupGroup: "Review Type", listItems : [{RevW :{//list of items of Popup menu, positive number indicates default selection"Engineering": +1,"Sample": -2,"Shop Drawing": -3,"Other": -4} } ],// This maps to a Radio Group in the PDF named 'Result'radioGroup : "Result",ra
Hello Experts,I'm a bit of a java rookie but usually I can get a code to swing out the way I need it to do. I have spent a week working through forums searching for a solution but as yet have not found a code that is effective. I have a PDF which needs to calculate the time difference between two sets of time input. Time1 = HH:MM:ssand Time3 = HH:MM:ssOR (ideally)Time1 = DD/MM/YYYY HH:MM:ssandTime3 = DD/MM/YYYY HH:MM:ssI have managed to make the date calculation work stand alone but ideally I would have it occur in the one calculation.The code is reactive and only occurs with a specific drop down result. Below is the only time calculation I have managed to get to work. It displays accurately in decimals, but does not calculate seconds yet, and try as I might when I modify the code to attempt the required format I can't get it to work. I am using Adobe 2017//get whatif valuevar cDisplay = this.getField("Dropdown8").value// compute number of days only if there are values for
I would like to have my fiscal year and budget year fields auto-populate based on the date the document is opened. My fiscal year runs from July through June.Therefore...If I open the document between July 1, 2018 and June 30, 2019 = FY 18-19 = BY 19If I open the document between July 1, 2019 and June 30, 2020 = FY 19-20 = BY 20etc.I would like for the fiscal years and budget years scripts not be "hard wired", i.e. that the script be able to live on without having to adapt it.My feeble attempt thus far for budget year:Created document level scripts that return today's date as two hidden fields: mm and yyyyI am trying to create a calculation in the budget year field that if the mm field falls between 07 and 12, then returns yyyy+1 field. If mm falls between 01 and 06, it returns yyyy.I know there must be a much better way but this is my current idea.Your help is greatly appreciated!
Hi Guys,I am completely new to Javascript. I have managed to do a few different calculations already but am quite puzzled by this one.The field I am trying to get the calculation for is "MortCalcC1" I have a dropdown called "Dropdown44"If the result of dropdown44 is "Client 1" i want "MortCalac1" to copy the number in "DebtOwedDD1"I have come up with this but it doesnt work:-if (this.getField("Dropdown44").value=="Client 1") event.value == "DebtOwedDD1";
I know how to develop Windows Application in Visual Studio to to control Adobe Acrobat and PDF Documents using OLE Automation.I am referring to page 21 in this guide:https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/iac_developer_guide.pdf I have done that many times in the past and the result was 100% successful.I need to do the same but using Java and Eclipse.My ultimate objective is to be able to extract text from a flattened PDF which is an appraisal form. So the Form has Fields and Values in a flattened PDF, and it follows a strict and fixed layout.So, I want to write a Windows Desktop Application that will open a flattened PDF, find the field caption, and jump to the field value, extract the text. I've done some research, and so far I realized that I have to use the Doc method "getPageNthWord()" using OLE JSObject in Java.I was able to use this code sample in the console window to extract the text of the current page:var len = this.getPageNumWords(this.pageNum);var tx
How to optimize a pdf file (reduce size) in C# example ?Is it using acrobat sdk ?[Question moved to the Acrobat SDK forum. -Mod.]
helloi have 3 lines this.getField("Sector2").value +"\n" + this.getField("Sector3").value + "\n" + this.getField("Sector4").value + "\n";but sometime "Sector3" value equal empty so the line break still show like:-sector2-Sector4i want remove the line break when "Sector3" value equal empty to be like:-sector2-sector4thank you in advance
I'm using following javascript to make the calculation result round to hundreds. If calculation result is 19999,then a = 19900 a=Math.floor(b*0.0003/100)*100Am I doing right?
I purchased Adobe Acrobat from Office Depot and I was provided with the product key only. The setup doesn't recognize it and it asks for a Serial Number. How do I get that? Thank you!
Hello board !I’m new over there and after spending some times on this board I wasn’t able to find my answers. I’m building a PDF designed to be a form to fill on a tablet (iPad or Android) to make contract agreement for a bike rental company.The goal is to save actions & time as much as possible to complet the form.The form contain personal info to fill, including some dates and check box, and a handwritten signature on the end.The final action is to send the contract to the customer by mail, using the value he put in the mail text field.I’m very close from the result I want but I stuck for 2 things :I wish being able the trigger the signature window when the customer hit the signature box. For now, hitting the signature box is opening a textfield inside even when it’s set to « Signature » or « Signature box » field. So I have to do it manualy with the button « Sign », create a new signature, uncheck « Save signature » button, let the customer sign then put the signature on t
First off let me begin by saying I am a newbie at JAVA. I have some DBase knowledge from years ago so somethings in JAVA are not foreign to me. My question is... I have a pdf form where i want to runs a calculation script based on a check box. So, I check a box and it runs a script in another field name. I have been searching the web and found some similar scripts but they don't do what I want. Thanks in advance for your help.This one works filling in the value in the same fieldvar nFOOTAGE = this.getField("FOOTAGE").value;if(( nFOOTAGE >= 1 ) && ( nFOOTAGE <= 1500 ))event.value = 250;else if(( nFOOTAGE >= 1501 ) && ( nFOOTAGE <= 2000 )) event.value = 300;else if(( nFOOTAGE >= 2001 ) && ( nFOOTAGE <= 2500 ))event.value = 325;else if(( nFOOTAGE >= 2501 ) && ( nFOOTAGE <= 3000 ))event.value = 350;else if(( nFOOTAGE >= 3001 ) && ( nFOOTAGE <= 3500 ))event.value = 375;else if(( nFOOTAGE >= 3501 ) && ( nFOOTAGE
I am trying to write script to apply a generate score based on selected text values in a drop down list. So for a field named "Likelihood" the values would be as follows -- Low; Low to Moderate; Moderate; Moderate to High; High. I want to produce a score based on each rating --Low=1Low to Mod=2Mod=3Mod to High=4High=5I have been able to write the script for the inverse where a numerical selection produces the text rating. But I need the opposite of that.var v = this.getField("Dropdown1").value;if (v=="") event.value = "";else { v = Number(v); if (v<2) event.value = "Low"; else if (v<3) event.value = "Low to Moderate"; else if (v<4) event.value = "Moderate"; else if (v<5) event.value = "Moderate to High"; else if (v<6) event.value = "High";}
I have a text field which at times is hidden. But, when I select it to be visible from the popMenu list it becomes visible (no problem there) but the cursor within the text field isn't visible, I have to click inside the text field to see it. What I would like to happen is to have the cursor visible when I choose to show that text field and not have to click inside the field. Is there a javascript that will enable the cursor to be visible as well as the field itself?
I need to Bates Stamp a large number of documents (upwards of 50000) for my law office and the attorneys I am working with need to be able to see both the Bates range and file name for each document in the file name [e.g. (25642-25644) Housing Information.pdf]. I have thus far been Bates stamping a group of files in a folder and then adding the range to the beginning of each file manually and individually and am currently around the 25000 mark which has taken multiple days to reach. Looking at the output options for Bates stamping however, I noticed that there is an option to either "replace file names with starting and ending Bates Number (e.g. 000100-000115.pdf)" or "Add to original file names" with the ability to insert something before or after a file name for the selected files. My question pertains to whether I can sort of blend these features and be able to Bates Number a group of documents whilst simultaneously inserting the ran
I have made a form in Indesign and set a check box as 'required'. However the form is allowing it to be submitted without this box checked.I have looked at the form in Acrobat and the field is set as 'required'.How can I change this?
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.