Unlock the power of Acrobat SDK through our community.
Als letztes aktiv
There is a data list of 20 columns in the form. Initially I was writing the following code in all 20 fields. This was working as planned. var x = event.target.name; var i = x.slice(4); var CheckA = this.getField("CheckA"+i); if(CheckA.isBoxChecked(0)){event.value=1;} else{event.value=0;}; I created the following simple function in document-level JavaScript. function CalA() { var x = event.target.name; var i = x.slice(4); var CheckA = this.getField("CheckA"+i); if(CheckA.isBoxChecked(0)){event.value=1;} else{event.value=0;}; } And I tried to change the following code into 20 fields. CalA(); There was no problem in the first field I changed. However, when I change the second field, debugging will start and the following display will appear. TypeError: CalA is not a function 1:AcroForm:CalA1:Calculate TypeError: CalA is not a function 1:AcroForm:CalA2:Calculate What is happening and how can I resolve it?
サイズが混在しているマルチページPDFで、あるサイズ以下の頁のみ透明テキストを付与することを考えております。アクションウイザードでは無理ですので、SDKで可能か、教えて頂けますか
I am using Acrobat Pro XI with W10 Pro and every time I create a pdf, I get an annoying pop-up notification saying that I just created it. It shows up as acrotray in the bottom right corner of the screen (just like all notifications) and I cannot make it go away unless I turn off ALL notifications. Does anyone know how to fix this without turning off all notifications?
Hello all,I have been given a task to write a JS script in acrobat pro to POST the complete pdf document currently opened to a server. Also, I need to send some particular cookie along with the request("Cookie" = "...") because of the redirection to the login page of our organization. I know a method of 'doc' object to post the complete pdf document 'submitForm()' but I cannot figure out how can we send that cookie(name, value) thing(if possible using submitForm()). I don't know about any other method. Any help regarding this would be greatly appreciated.Thanks.
Basically, I want an undo.If I check the box, a bunch of stuff happens. But then I realize I checked the wrong box and want to uncheck it and return to the default state. All help is welcome. Here's what I've tried://Whoops I didn't mean to check that box. I want to uncheck it. (doesn't work) if (this.getField("splyAD700").value!="On") { this.getField("splyAD700").checkThisBox(0,event.target.value = "Off"); } else { //This is what should happen when I check the box. (it works) this.getField("splyAD700").checkThisBox(0,event.target.value = "On"); app.launchURL("https://www.somesite.com", true); }
There is a button. When the user presses the button, an alert with a description will appear. The alert has a checkbox. I want to make this button itself to disappear when the checkbox is checked by user. Below is the code that doesn't work as expected.var PINK = this.getField("PINK"); PINK.oMyCheckbox = {cMsg: "Hide this button", bAfterValue: true }; var PINKALERT = app.alert({cMsg: "TEST", cTitle: "TEST", nIcon: 3, nType: 0, oCheckbox: PINK.oMyCheckbox }); if (PINK.oMyCheckboxf == false){PINK.display = display.hidden;};There are two questions. There is no effect of "bAfterValue: true" If set to "PINK.oMyCheckboxf == false", the button will not disappear regardless of whether or not it is checked.If set to "PINK.oMyCheckboxf == true", the button will disappears regardless of whether or not i
Hello all, I'm attempting to write a script that enters text into an Acrobat field via Javascript but prevents additional text from being entered once it hits the field bounds. My problem is, unlike when entering text manually, the fieldFull keystroke event property is not triggered when populating a field via Javascript. Here's an example below:var f.addField('name', 'text', 0, [0, 200, 200, 0]); f.multiline = false; f.doNotScroll = true; f.textSize = 36; f.setAction('Keystroke', 'app.alert(event.fieldFull)'); var contents = 'I am a sentence.'; for (var i = 0; i < contents.length; i++) { f.value += contents[i]; }The listener detects the keystrokes just fine, but for whatever reason event.fieldFull is returning false regardless of whether the text is outside the field bounds (aaand the script continues to enter text despite the fact that doNotScroll is enabled). Any reason why this is or any possible workarounds? Thanks in advance! 🙂
Hi, I'm new to this. I have a group of 3 checkboxes ("High","Medium", and "Low") that I want checked based on the value that is calculated in another field "Total". If total is >= 40 then High checkbox is activated with the others off. If total is between 30 to 35 then Medium checkbox is activated with the others off.If total is <=25 then Low checkbox is activated and the others off. I appreciate any help with this. Thanks.
I'd like some hover text to appear over a dropdown item when a user is deciding to slelect it. A purely hypothetical example.Say my item list is "next day", "2 day","next week" for shipping opitions. However, when a user goes down the dropdown list I would like a text box to pop up with few details on that item to help them make a choice. For example, with the mouse over "next day" it may say "You will have the option later of choosing from next day USPS Mail, UPS or FedEx, but only DHL outside the US"
Hey there,I am struggling a bit with my code, as I do not get it to work with my form. The current code I have is as follows:var field1 = this.getField("Brand").valueAsString;if (field1=="Samsung") event.value = "SM-G960F";else if (field1=="Apple") event.value = "A2111";else event.value = "";The steps I followed were:1) I created a text field named "Model" and made it "Read Only"2) Under "Javascript", I created a new document JavaScript called "Model"3) I filled in the code above, where the goal is as follows: - The code would start by retrieving the text field "Brand" to see what value has been filled in (i.e. "Samsung" - If "Samsung" has been filled in, the "Model" field should display the string "SM-G960F" - If "Apple" was entered in the "Brand" field, the "Model" field should display the string "A2111" - If nothing has been filled in, then the field should stay empty.The current error is as fo
Hello community, I have been trying to write a JavaScript extension which makes a 'GET' request to a server on pressing of a sub-menu item in Adobe Acrobat professional. After writing the script after following from an online resource(https://gist.github.com/randycasburn/802f278c3cfef0873dd086c34bbb9fee), I tried executing the folder level script but it gave an 'object aggregate' error in console. I tried looking for it online but could not found anything helpful. I think the issue is with the request which is not able to fetch data. Below is the script for the same. Any help regarding this would be greatly appreciated.Thanks. // Make HTTP GET requestajax = app.trustedFunction(function(fURL) {app.beginPriv();Net.HTTP.request({ cVerb:"GET", cURL:fURL, oHandler: ajaxCallback});app.endPriv();}); // process the responseajaxCallback = {response:function(msg,uri,e){var stream = msg;var string = "";var error = e == undefined? 'No HTTP errors' : "ERROR: " + e; // her
Hi there,I have an pdf file and I would like to make it a form an sum up the field as minutes notification.The column ETO should be not exceed 60 minutes. (See attached file) I'm a newbe to javascripting....can anyone help me out?Best regardsSylvia
Hello everyone, I am a beginner in developing Acrobat functionalities and have been provided with this task of having a button added to the toolbar , which when clicked , a popup should appear with a button , which when clicked does two things : 1) Makes a post request to a server and 2) Launches a particular web page. After going through the Acrobat SDK documentation, I found that Javascript provides methods for two of these functionalities i.e. namely making a post request (using Net.HTTP object) and launching a web page (using launchURL). But the issue with Javascript was , it is not possible to add the button directly to the toolbar, yes I know we can customize the toolbar by adding the add-on tool to the toolbar but that requires some hand work. On the other hand , the Acrobat SDK documentation provides for adding a button to the toolbar directly using plugins, but I had also read that plugins do not provide support for web services.&nb
Hello,I have a 100-pg PDF workbook that I am trying to set up where a student can click a submit button that will send just that individual page to an instructor. I was able to set up a .fdf link and was successful sending a test file to myself. (page 6 of the Test document attached.) However when I had two of my clients test it out it wouldn't work. One got the attached error, the other one the submit button wouldn't work at all. Thoughts? I am not familiar with java script but if somebody could walk me through that I think I could figure it out. (I also tried making just the submit button active but it gave the attached "invalid file" error.)Thanks in advance!
Have seen similar ideas but don't think I know the commands to do this in Javascript.Here are my two situations.SITUATION 1I have the text Fields F1 and F2, and a Dropdown box field D1.I want the value dispalyed in F1 to be "text string which I enter" D1 F2Example, "text string which I enter" = "Stopped smoking?" Field D1 options "Y","N", say Y is selectedField F2 is a number (calculated elsewhere), let's say 3.So I would like it to appear in Field F1 as "Stopped smoking? Y 3" SITUATION 2Similar to the above except there is no D1, Field F1 is now a dropdown box and would like to use the value selected in the F1 dropdown list to create the output displayed in Field F1 as "value selcted in F1 F2value" Do need to put a space between each of these values so it can be read easily.Would need to be able to select on F1 again and get the original drop down list and have it rewrite if a new selection is made.In th
I am trying to understand the equivalency of some structure in the SDK and how they relate to a Cartesian coordinate system. I feel like some of these questions are dumb, but I don’t want to make assumption and continue with a false sense of understanding of the how the structures maps. In an attempt to express my confusion clearly, I have broken down these into multiple questions. Question 1. How does an ASFixedPoint map to x and y?Given an ASFixedPoint, is it safe to assume that:h ---> xv ---> yI took to assume that h was short for horizontal, and v for vertical Question 2. How does a rectangle expressed as [left top right bottom] map to an ASFixedQuad? Here’s the source of my confusion: in the PDF Reference V1.7, Section 3.8.4, a rectangle is said to be specified by an array that takes the form:[ll_x, ll_y, ur_x, ur_y] where ll_x is lower-left x, ll_y is lower-left y, ur_x is upper-right x, ur_y is upper-right y The passage also sta
Hello, I am completely a novice at this, and borrowed part of a script from a sample online. I am working a stamp with a dialogue box prompting for the date, and defaulting to the current date if no response. I have gotten it to display the dialogue box and the default date. But, the results don't end up on the stamp. Could someone please assist on resooving the issues? if(event.source.forReal && (event.source.stampName == "#2Nw2jMn7S5l9QIPW-WGOHB")){ var rgEmpty = /^\s*$/; var cDate = null; var cDfltDate = null; if((event.value != null) && !rgEmpty.test(event.value) && util.scand("mmm dd yyyy",event.value)) cDfltDate = event.value; else cDfltDate = util.printd("mmm dd yyyy",new Date()); while((cDate==null) || rgEmpty.test(cDate) || (null == util.scand("mmm dd yyyy",cDate))) { &
Hello Community,I have been trying to add a javascript extension to make a 'GET' request to a server upon pressing of a menu item created. On executing the folder level script, I got an 'object aggregate' error. I think it is not able to fetch data using the request. I tried searching for that error online but could not get anything. I am developing this in Adobe Acrobat Professional. Below is the script for the same. Any help would be greatly appreciated.Thanks. // Make HTTP GET requestajax = app.trustedFunction(function(fURL) {app.beginPriv();Net.HTTP.request({ cVerb:"GET", cURL:fURL, oHandler: ajaxCallback});app.endPriv();});// process the responseajaxCallback = {response:function(msg,uri,e){var stream = msg;var string = "";var error = e == undefined? 'No HTTP errors' : "ERROR: " + e; // Here it is giving [ object aggregate ] error.string = SOAP.stringFromStream( stream );oResult = JSON.parse(string);console.println(error);console.println( "id: " + oResult.i
Hello everyone, I am a complete beginner in developing Acrobat functionalities. I had this task of adding a button to a toolbar which , on pressing would show a pop-up and I was asked to do this using Javascript. I successfully added the button to the add-on toolbar and found out that this add-on tool could be manually added to the toolbar with the help of customizing of toolbar. But now I am asked if this manual addition of the button to the toolbar could be automated using some script. I went through the Javascript API reference documentation and found that it has the execMenuItem method, but it can execute only specific commands (example: Save As). Could anyone let me know if this automation could be done using Javascript?( The manual addition I am speaking about is Going to View -> Show/Hide -> Toolbar Items ->Customize Quick tools ) I know that the button can be directly added on to the toolbar using plugins, but that would require development in C++ and w
Hello everyone, I am a complete beginner in developing Acrobat functionalities, and I had been given a task of adding a button to the toolbar, which on pressing would display a pop-up, using Javascript. I was able to add a button to the add-on toolbar and then I manually added the button from the add-on tools to the toolbar. I have been asked if this manual addition could be automated, I went through the Javascript API reference and found that it provides the execMenuItem method but it only is able to perform some commands such as Save As. Could it be possible to write a script that would automate the manual addition ? The manual addition that I am talking about is Going to View -> Show/Hide -> Toolbar Items -> Customize Quick Tools I am aware that we can add a button to the toolbar directly using plugins but that would require developing in C++, and our team is trying to explore functionalities that could be achieved using JS scripts Thanks
Hi all - we have a couple thousand PDFs we need to export to PPT, and I am having trouble finding a way to do that in Acrobat Pro We've tried creating an Action in the Action Wizard to process multiple files, but this does not work because you still have to watch each file convert and then manually click to execute the next one, going through the same sequence of choosing what to export to and where to save, even though it is the same information every time. There is no way we can find to specify the settings in advance (what to export as, and where to save). We tried combining the PDFs into a single file to export, but the PDFs are different dimensions so that doesn't export to PPT properly Does anyone have any guidance? Would SmallPDF work better? Anything would be very, very deeply appreciated!
I often will use the "Save as Other" function in Adobe, to change documents in pictures. Recently, I noticed that when saving a document, the white in the background comes out tinted yellowy green. Ofent these may be text documents originally created in word and then saved in Adobe.I did get a new computer, and had to re-download Adobe onto it, so perhaps it is a setting that I am missing?I tried to use an online PDF converter (Zamzar) and it does NOT seem to have the same problem, so it is my adobe program's conversion of the PDF that is causing the issue, and not the PDF file.
Hello - I am looking for a script that will allow me to merge two pdf files and place them in such a way that a source document page is placed in every other page of the exisiting document. For example, if you have an odd sequenced page number and even sequenced page number, and you'd combine them to form a 1, 2, 3... sequence. Any help is appreciated!
Hi There,I was wondering if anyone could help me generate a code for a problem I have in Acrobat. I have two fields, one which will have a user entered number and another which will display a different number based on the user input. For example: The user inputs (16) into their field and the second field would populate (3). Likewise, if the user inputted (8) the second field would display (-1). This was this code I've been working on but I cannot seem to get it right. Any thoughts? switch(event.value) { case "SCORE":var nSubTotal = this.getField("subtotal").value;if( nSubTotal > 28 ) event.value = 9;else if( nSubTotal > 26 ) event.value = 8;else if( nSubTotal > 24 ) event.value = 7;else if( nSubTotal > 22 ) event.value = 6;else if( nSubTotal > 20 ) event.value = 5;else if( nSubTotal > 18 ) event.value = 4;else if( nSubTotal > 16 ) event.value = 3;else if( nSubTotal > 14 ) event.value = 2;else if( nSubTotal > 12 ) event.value = 1;else
The question is the same as the subject. Is it possible to move to a specific page according to specific conditions ? This question is not to change the page structure, but to change the displayed page. Of course using JavaScript.
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.