Unlock the power of Acrobat SDK through our community.
Actividad reciente
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
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
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
¿Ya tiene cuenta? Iniciar sesión
¿Aún no tienes una cuenta? Crea una cuenta
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.