Design the future of fashion, win Firefly Pro 👗✨
Unlock the power of Acrobat SDK through our community.
Recently active
[Moderator moved from Adobe Creative Cloud to JavaScript.]I have watched more tutorials and read more articles than one should ever have to watch/read on this topic, and yet I still can't seem to find the answer for what Javascript to insert into the custom calculation script in order to display the User identity of the document. Please can somebody help, I'm a Javascript novice.Using a mac. I've tried to look at the Javascript of the existing Dynamic Stamps that come preloaded with the program, but for some reason I can't seem to see the Annotations folder in the Plug-ins folder.This Youtube video was the closest I got to coming right: Adobe Acrobat DC Dynamic Stamp Tutorial - YouTubeI inserted the following script, but it had issues with the first two lines of script and it didn't seem to like the hashtag either:var cAsk = “Enter a name”;var cTitle = “Document State for Stamp”;if(event.source.forReal && (event.source.stampName == “#templatename”)){ event.value =
I need a solution in place to split a multi line field at a certain point and fill the remaining split text into another field. I have three multi-line fields named Field 1, Field 2, and Field 3. I should say that data is not typed into these fields but rather is populated via a series of functions that grabs data from the other form fields and summarizes results in Field 1. If data does not fit in Field 1 I would like the text to overflow into Field 2..and so on. I already have the code to populate the fields.I had the idea that the easiest way to do this count the number of paragraph returns and then split when a certain number is reached. I know how to count the returns but not sure how to implement splitting overflow.. So for example, if I have this code: var count = 0;var s = getField("Field1").valueAsString;for (var i = 0; i < s.length; i++) { if (s === "\r") count += 1;}....and I want to split the text at 50 returns.. then fill Field2.Can this be done? Maybe
Requirements:Watermark around 100 pdf file of around 100 pages each with below conditions:1. 5 Pages to be watermarked for each file excluding Pages 1 - 5 2. All 5 pages for each file should be different .. ex- if File1 was watermarked on page nos. 11, 22, 49, 80, 95 then second file2 should be watermarked with different set of pages ex- page nos. 14, 18, 49, 90,99 and so.. on3. Each file must close automatically without prompting to save dialog box everytime. I am using the below script to save file but still prompting the save dialog boxvar oMyDoc = this.documentFileName;app.execMenuItem("Save", oMyDoc); this.closeDoc(true);I have the following script for watermarking and generating random number: var cMyText = util.printd("mm/dd/yyyy", new Date);var r = Math.floor(Math.random() * 100) ;if (r > 10){var first = r; }this.addWatermarkFromText({cText: cMyText,nRotation: 45,cFont: "Helvetica-Bold",nFontSize:20,aCo
Hi, We can call InDesign/Photoshop javascript from Java using applescript. Like this, is there is possibility to call acrobat javascript from Java?
Can someone please help me? I need to know how to calculate checkboxes (not fields), when two or more checkboxes have been chosen in Adobe XI Pro. I'm totally lost.This is what I have so far, but I can’t get them to calculate.event.value=0if (this.getField("CheckBox1").value!="Off")event.value=95; if (this.getField("CheckBox2").value!="Off")event.value=200; if (this.getField("CheckBox3").value!="Off")event.value=525; if (this.getField("CheckBox4").value!="Off")event.value=647; if (this.getField("CheckBox5").value!="Off")event.value=617; if (this.getField("CheckBox6").value!="Off")event.value=800; if (this.getField("CheckBox7").value!="Off")event.value=65; if (this.getField("CheckBox8").value!="Off")event.value=65; if (this.getField("CheckBox9").value!="Off")event.value=65; if (this.getField("CheckBox10").value!="Off")event.value=95; if (this.getField("CheckBox11").value!="Off")event.value=148; if (this.getField("CheckBox12").value!="Off")event.value=525; if (this.getField("
I want to display number of fields filled.... everything is working correct but the dropdown field is being counted as filled already even before it is been selected with a value;var totalfields = new Array(Text1, Text2, Text3, Text4, Dropdown1, Dropdown2);var count = 0;for (i = 0; i < totalfields.length; i++) {if (this.getField(aFields).valueAsString != "") count++}event.value = count;The above script displays 2 always i.e. it presumes Dropdown are filled beforehand .Same is the case with Radio buttons... it is also showing as filled before selecting any option.Any solution so that it should show 0.Thanks
Hi all,I have a 40-page PDF price list from a supplier which contains hundreds of prices of various products. We'd like to run a formula over every single listed price and replace our supplier's "buy" price with our "sell" price so we can forward the document to our customers. The price list includes formatting, images and colours etc which we want to retain so exporting to Excel, Word etc isn't an option.I'd like know if it's possible to create a script that can replace every single "buying" price in the document (all are prefixed with $) with our "selling" price.Our simple calcuation involves multiplying the price by X and rounding to a ceiling of $10.Thanks in advance for your help.
How would this Excel formula translate to a custom calculation script in a PDF form?=IF(A4<=10, 16.68,16.68+((A4-10)*1.67))Thanks!
Hello, I am trying to figure out if you can set one radio button within a group to read only. I know how to make it work for disabling the whole radio button group with the following Mouse Up JavaScript:this.getField("Style").readonly=true;Within the "Style" group I have two radio buttons, "A" and "B". How do I alter the above script to just set radio button "A" to read only?Thank you.
I am running this script to look at a documents layers, if it contains a layer "Hypertext" then store the page number and it's corresponding layers. Then filter out a few layers. Then what layer items are left get bookmarks created under headers and assigned a JavaScript. This script works fine on several other documents. Now I am having an error message and not sure why.Console output:TypeError: hypertextArray[isolatedPages] is undefined65:Document-Level:bookmarksJavaScript in it's entirety:var layerAction = [ ["141 (Lt Orange)", "oneFourOne();"], ["500 (Med Pink)", "fiveZeroZero();"], ["522 (Lt Purple)", "fiveTwoTwo();"], ["577 (Lt Green)", "fiveSevenSeven();"], ["651 (Blue Gray)", "sixFiveOne();"], ["5655 (Lt Gray)", "fiveSixFiveFive();"], ["SUB 651 (Blue Gray) (Ethernet)", "subSixFiveOne();"]];var hypertextArray = [];var isolatedPages = [];for (var i = 0; i
Hello,Looking for some help with If Else statements in a PDF. What I would like to accomplish is changing the wording of an email subject and body based off the user choices in a drop down.Basically if the user selects "yes" from a dropd own titled "Repair Req" when they need a repair request when submitting the form, the email subject line and body wording will change. If the user selects "no", then the subject and body are different.var cToAddr = “user1@email.com”;var cCCAddr = "user2@email.com;if(this.getField("Repair Req").value!="Yes") {var cSubLine = "FINAL w/ REPAIR REQUEST“;var cBody = "Repair Request”;}else{var cSubLine = "FINAL"; var cBody = "Final”;}this.mailDoc({bUI:true, cTo: cToAddr, cCc: cCCAddr, cSubject: cSubLine, cMsg: cBody});
I would like to have a price list total based on which checkbox my client chooses to select. It could 1 they select, 10 they select, 15 they select or more. See screen capture of my form.
Hi guysI need to combine the below 2 java scripts into 1. I would be most grateful if someone could advise if this is possible and if so how do I do it? I have marked the broken the scripts as **Script 1** and **Script 2**.**Script 1**//Start Script//First you make the values for box1.//var myPlanTypeValues = ["--SELECT--", "Leadership", "Mid-Management", "Sales"];//Then you populate the values to box1.//this.getField("PlanType").setItems(myPlanTypeValues);// Then you define what has to be shown in box2 when value is selectedvar accountingData = {"Leadership": ["--SELECT--","MIB"],"Mid-Management": ["--SELECT--","Local Bonus Plan"],"Sales": ["--SELECT--","#1 Sales Account Manager – Aftermarket/Direct","#2 Sales Account Manager – OEM/Direct","#3 Sales Account Manager – OEM/Distribution","#4 Sales Account Manager – OEM/Overlay","#5 Sales Manager – Any Products","#6 Selling Sales Manager – Any Products","#7 New Business Developer – Aftermarket/Direct","#8 New Business Developer – OEM/Dire
Hello,I have a form with 4 groups of radio buttons ("Style" in the script below is one of the radio group names). I have created a text field at the end of the form where I would like the selection value from each radio group to display. I am able to get it to work for displaying one group value with the following, but need help with having it work for multiple group values?event.value = this.getField("Style").value;Appreciate any help.
I am new to programming anything in an adobe created form; I am trying to calculate the shipping cost to be added to the subtotal of an order based on the quantity of items ordered. If the number ordered is less than 5, the shipping cost is 10% of the subtotal, if the number ordered is 5 or more, the shipping cost is zero. I wrote the following custom calculation:var A=this.getField("TNB").value;var B=this.getField("Subtotal").value;var C=0.10*B;if(TNB=>5){Shipping==0};else {Shipping==this.getField("C").value};I am getting the following error: "syntax error 5 at line 6"Can someone help me
When I save a PDF as a Word Doc, any word that contains a ligature (for example fi) -- the rest of the word after the ligature is replaced by a tab. How can I make it stop doing this?
How can I search through my list of bookmarks and assign a JavaScript action to the one I am looking for?If I run the following script:for (var i = 0; i < this.bookmarkRoot.children.length; i++){console.println(this.bookmarkRoot.children.name);}I get the top level of my bookmarks but not the bookmarks nested under these.Console shows:Schematic Tools - Volume 1Schematic Tools - Volume 2Here is what my bookmarks look like:I am needing to look for specific bookmark names and assign different JavaScript functions to them.So something like this is what I am looking for:for (var i = 0; i < this.bookmarkRoot.children.length; i++){if (this.bookmarkRoot.children.name == "V1 - 021 (Orange)"){cExpr: "oneTwoOne();"}if (this.bookmarkRoot.children.name == "V2 - 032 (Red)"){cExpr: "zeroThreeTwo();"}}How do I search for the nested bookmark and assign it my desired function?Any tips would be appreciated!
hi, I have the following script which isn't working?I would like the MINISPL!1, MINISPL2, MINISPL3 to bring up MINI SPLASH VLUe, and numbers 4 - 6 to bring up MINI SPLASH WHITE??The blue will end up in one field, the white in another? hope this makes sensefor (var i=1; i<=6; i++) { if (this.getField("MINISPL"+"1","2","3").valueAsString=="text") { event.value = "MINI SPLASH BLUE"; break; }}
I have a fillable pdf that works as a to-do list. I take items off and add to it daily. Is there a way that when I remove a completed task, all the task below it move up? If so how would I do that? Any suggestions.
I have a trial version of Acrobat Pro DC and am doing a proofreading job that requires changes to be seen, but at present they are not. My question is: can they be seen? If so, how? And if not, which program with a free trial can I use to do so? Thank you.
I am wanting to use one of three radio buttons to change comments in another section of the form. The form is for an elevation certificate and the radio button options are construction drawing, under construction, and finished construction. At each stage there are different things needed in the comments section that deal with the stages of the EC. Is there a way to link the comments in the comments section with the radio button choices so I don't have to type them in each time?
How do you formulate an IF function where if the value of Field "C" is less than 70,000, then the value of Field "Tier 2" is not formulated?Right now, this is what I have:event.value = (70000-this.getField("C").value)*0.2;if(C<70000)event.value,"Not Commissionable"I know this isn't correct as I am not a professional with Javascript or Advanced Calculations, but I would like to know how to do this.Thank you!
Is there a way to measure performance parameters like time until document is loaded or render complete?Trying to understand how long does it take to load some of my "heavy" documents
I have a pdf with form fields and need to do conditional formatting. Below is the formula as it would be in Excel. The Adobe field names are named the same). I am getting a SyntaxError when I past this into the custom calculation script box. Is there a better way to do this?=If(and(SoftCosts/(MSRPPricing+SoftCosts)<.25),(EquipmentMSRPPricing/(MSRPPricing+SoftCosts)>.25),”Yes”,”No”))
I'm a novice at this so I'd appreciate any help. I've done a lot of searching in forums and can't find a full answer to my problem. I have a 12 page form, mostly text fields, but also radio buttons and check boxes. I have many check boxes/radio buttons that when selected reveal a hidden text field. I want to add an option to clear the form, but when I set up a reset button using the "Reset a form" default action, it not only clears the form, but clears out the hidden form field properties and they all are visible again. I want to create a button using script to clear the form while keeping all form fields in their original state. In my searching I found this script:var nButton = app.alert({cMsg: "Warning: You are about to reset all data in the form. \n\nDo you want to continue?",cTitle: "Reset Form Data",nIcon: 1, nType: 2});if (nButton == 4){ xfa.host.resetData(); xfa.form.remerge();}I am assuming something like this will work and I know
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.