Unlock the power of Acrobat SDK through our community.
Recently active
A simple question. Is there a method to copy the value of a field to the clipboard?
Does writing all the code in each field, or writing a document-level function and writing it, change the overall processing speed of the document? Does (1) and (2) below change the overall document processing speed? For example, suppose there are about 20 fields that use the same calculation. And suppose it's a bit longer code. (1) Write the same code in all fields.(2) Write a document level function and use it. Obviously, (2) is the safest and easiest way to write code. Is there any difference between (1) and (2) above? Of particular interest is how PDF JavaScript uses memory. I've heard that generally global functions use a lot of memory, so it's better not to use too much.
Issue: The document cloud SDK for viewing PDF files doesn't seem to work in Internet Explorer 11 and Brave browser. Link: https://t.co/cENwldMAqLI am not sure if this is an issue with the SDK itself or if it's the issue with the browsers in question.Request some Adobe expert to assist me on this. I'd really appreciate it. Thanks
I am trying to create a set of flashcards to take a user to a random question and then another button to take the user to the answer. I have a PDF document with alternating questions and answers, about 400 pages in total. Any help would be appreciated.
I've found and tried some similar questions in this forum and they just don't work. I think it's because I don't understand correctly. When saving with FDF, I want to save with a file name that is a concatenation of some field names in the form and the save date and time. First, I tried writing the following code in a text field. The file name as expected is displayed. var Pink = this.getField("PINK"); var Blue = this.getField("BLUE"); var FNAME = util.printd("yyyymmdd-HHMM-",new Date())+Pink.value+"-"+Blue.value+".fdf"; event.value = FNAME; And then I created a button and created the following code. I deleted the last line above and added the following. Some are listed below, but all are actually just one line of code. I'm actually trying out more code. But those was all a failure. Because I want to let the user choose where to save the file, the save window must be opened. this.exportAsFDF({cPath:cPath + FNAME}); this.exportAsFDF({cP
At the start, the fields on the below screenshot are all hidden apart from the Term box.The script below sits in the custom validation field of the term box and adds ticks and makes visible certain fields if a term of under 2 is entered. It does differenet tick boxes etc if a term of 2 or over is entered. There is also a mouse up action that ticks all boxes if C is ticked. This all works perfectly.....What I would like to do, but for the life of me cannot work out what I need to add, is for all the fields (except the term box) to reset to hidden if the term box is either blank or someone types 0. if ( !this.getField("checkbox_c").isBoxChecked(0)) {if ( event.value < 2) {this.getField("checkbox_a").checkThisBox(0, false);this.getField("checkbox_b").checkThisBox(0, true);this.getField("checkbox_c").checkThisBox(0, false);this.getField("checkbox_a").display = display.hidden;this.getField("checkbox_c").display = display.hidden;this.getField("SubsPerMth").display = display.hidden;th
I am using Acrobat Pro DC. I would like to create custom stamps based on a stamp we have to use in the shop. The stamp requires a live signature and date. Is it possible to create a custom dynamic stamp that would load an image of a persons signature with the current date?Thanks
Hello everyone I am trying to add a button to a toolbar using plugins and I want it to have a custom icon.I found in the SDK the following code snippet: //Declare an AVToolButton objectAVToolButton MyButton = NULL; //Create an AVIcon objectAVIcon myIcon = (AVCursor)LoadBitmap(gHINSTANCE, MAKEINTRESOURCE(IDB_BITMAP1)); //Create a new buttonMyButton = AVToolButtonNew(ASAtomFromString("MyExtn:MyButton"), myIcon, false, false); When I try using this in visual studio, it shows me the error "identifier gHINSTANCE is undefined"I have included the "PIMain.c" file as well , and as the SDK says that gHINSTANCE is an instance of object HINSTANCE, I can also see this object declaration in PIMain.c file. Can anyone suggest what could be going wrong here?Thanks
Dear Adobe support Team..I have been trying to create Javascript TimeSheet calculation and I know this must have been possibly asked but I am having two issues1. Every time I click on the cell it pops up saying : "The value enetred does not match the format of the field[Wk1_Thurs_HoursWorked]" .2. I can not able to perfreom the subtraction of HRS Worked - Breaks (they are in decimal format).I really appreciate this help as this is urgently needed for an hospital system.
Hi,I'm very new to working with forms and javascript so please bear with me. I've got two dropdown lists with export values used for simple calculation. (i.e.: event.target.value = this.getField("12Round").value; in a separate text box)Both of the dropdown lists have three options: None, One, and Two with export values of 0, 2, and 4 respectively. The issue I have is that both are dependent on the other.Example: Take a box with two lids that can have two different sets of openings; Round or Square. When the dropdown choice comes up, the quantity outputs for each field work fine, however (2) of each dropdown can't be chosen. Conditions that work are: (1) of either type, (2) of one type, or (1) of each. Is there a way to have the dropdown box selections (freeze/ change colour?) as soon as the maximum is reached between both of them? Thanks!!
Hallo Community,wer kann mir helfen?Ich habe eine Dropdown-Liste (Name: Drop1) mit den Optionen:Auswahl1 (Exportwert=1)Auswahl2 (Exportwert=2)Auswahl3 (Exportwert=3)und eine Textbox (Name: Text1).Bei den Eigenschaften der Dropdown-Liste habe ich unter Format ein benutzerdefiniertes Formatierungsskript eingefügt: if (this.getField("Drop1").value==1){this.getField("Text2").value = "Bla"}if (this.getField("Drop1").value==2){this.getField("Text2").value = "Blub"}if (this.getField("Drop1").value==3){this.getField("Text2").value = "Bling"} Dieses Skript bewirkt, dass je nach Auswahl aus der Dropdown-Liste ein entsprechender Wert in der Textbox angezeigt wird:Funktioniert einwandfrei.Jetzt möchte ich die Textbox gegen eine weitere Dropdown-Liste (Name: Drop2) ersetzen, die je nach Auswahl aus Drop1 2 Optionen zur Auswahl anzeigt: Wie muss der Code aussehen und wo muss er eingefügt werden (bei Drop1 oder Drop2? Als benutzerdefiniertes Formatierungsskript oder als ben
Hello everybody,I created a form from an Excel sheet. Acrobat has badly named many fields. I don't want to rename them all by hand. Instead I want to "read" the original fields, create a new one with a different name in the same position and then delete the old one.I would like to test this in 12 fields (there is one on each of the 12 pages of the form). When creating the form, they were named as follows: Name / Name_2 / Name_3 / ... / Name_12.To do this, I tried the following code in the console: for(var i = 0; i < this.numFields; i++){ var fName = this.getNthFieldName(i); if(fName.indexOf("Name") !== -1){ var f = this.getField(fName); var fCoords = []; var fPage = (f.page + 1); fCoords = f.rect; this.addField(("Name." + fPage), "text", f.page, fCoords); this.removeField(f.name); fCoords.length = 0; } } It works as it should on 10 pages.Only on page 1 (.page 0 / .name: "Name") and on page 10 (.page 9 / .name: "Name_10") not. On page 1, the field is on
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
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.