Unlock the power of Acrobat SDK through our community.
Recently active
Hello folks,I need some assistance by toggling the visibility of layers. I am not to familiar with JS yet but i managed at least to show single layers depending on what is selected from a list. The layers hold descriptions in English, German and French language. This layers are shown if i put in the following code into the validation field: var layers = this.getOCGs();var v = event.value;for (var i = 0; i < this.layers.length; i++) {if (layers[i].name == "Deutsch" && v == "Deutsch") {layers[i].state = true}else if (layers[i].name == "English" && v == "English") {layers[i].state = true;}else if (layers[i].name == "Francais" && v == "Francais") {layers[i].state = true;}else {layers[i].state = false;}} How do I manage to show another layer named "Hintergrund" (German for Background) all the time, no matter which of the language selections has been made? Thank you in advance for your kind support! Matthias
Hello,I have several fields on a form that are required. Instead of displaying a generic message stating that a required field has been left blank, I would like to display a specific message for each required field, if left blank. Below if what I was trying to start off with but I get a syntax error stating "missing; Before Statement 1: at line 2 Var CoreBankName = this.getField("282_Core_Ref_Bank_Name");if (CoreBankName !== null){CoreBankName.setFocus()app.alert("Core Client Bank Name is required")};
When right clicking a PDF file and choosing to print, Adobe Acrobat (or Reader) opens and then minimizes. Is there a way to have it close automatically?
When creating a dialog box containing a listbox with the execDialog function I am having a problem with Adobe Acrobat Reader DC. I want to create a listbox with no item selected. When using the array like { "Line1": -1, "Line2": -2, "Line3": -3} the "Line1" item is selected when it has a code beside it of -1 not +1. There is no problem when using an alterantive to Adobe Reader I have. Thanks for any help.
Hi,I select text using the PDTextSelectCreateWordHilite method. I need to change the color of the text characters. How to do it.Thanks.
Good Morning. I am trying to figure out how to get a field to automatically populate a value using java script with an if then statement. I want it to look at the value of two other fields and return which is the highest, below is the code i have been using. Any and all help is appreciated. I have tried it on both the calculations tab with custom java script and on the Actions tab but am unsure which trigger to use and which is correct. if(this.getField("EXV").value > this.getField("CFMV").value){ event.value = EXV } else { Event.value = CFMV } [Moderator moved the thread to the correct forum]
I am trying to take 2 times (start time and end time) and have the total time determined. I want it to come out so that if it is an hour and a half total it will look like 1.30 instead of 1.5. I am using Acrobat Pro DC and it always calculates correctly but when I take the file and try it on a work computer which is a different version (not sure which) it comes up with a different answer. Could someone look and see what I am doing wrong please. Sometimes the start time may be 23:00 and end at 00:30 so that is why I added the last part of the code but not what is wrong. Thank You for any help! var hrsStart = parseInt (this.getField("ST").value.split(":")[0]); var minStart = parseInt (this.getField("ST").value.split(":")[1]); var hrsEnd = parseInt (this.getField("ET").value.split(":")[0]); var minEnd = parseInt (this.getField("ET").value.split(":")[1]); if (minStart > minEnd) { var minRez = 60 + minEnd - minStart; var hrsRez = hrsEnd - 1 - hrsStart; } else
The Help API says that the PDETextGetText method (PDEText pdeText, ASUns32 flags, ASInt32 index, ASUns8 * textBuffer) gets the text for a text run or character.textBuffer - the text of the specified character or text run. I created a PDF file in which I placed the text: abc. I put the following statements in the code:ASUns8 buffer [128];PDETextGetText (pdeText, kPDETextRun, 0, buffer);The debugger showed that the contents of the first 3 bytes of the buffer are '\ x1', '\ x2', '\ x1'. What then is written in buffer and why does it not match the text from the file?
Hello. We are using folder level javascripts to save data from our PDF files to a text file for data imports. This worked very well on windows but now were trying to use the same system on a Mac Mojave 10.14.6 machine. Currently it is creating the text file but it is not writing the data to the file. In this situation, the variable for our data is "lines". We ensured that the data is coming from lines by making its value ".txt" and adding it to the path. Here is the code: qipSaveCSV = app.trustedFunction(function(doc, path, lines) { app.beginPriv(); myDoc = app.newDoc(); myDoc.saveAs(path, "com.adobe.acrobat.plain-text","", false, true); var f = myDoc.addField("lines", "text", 0, [0, 0, 0, 0]); f.multiline = true; f.value = lines; myDoc.saveAs(path, "com.adobe.acrobat.plain-text", "", false, true); myDoc.closeDoc(true); app.endPriv(); }); If you have any ideas as to why this isn't functioning properly, help would be greatly appreciated.
Hi I work for a charity and we need to password protect are PDF's when sending reports to the Health Board can you advise me which Adobe package I should buy?Also do you offer a discount for charities?Thank you for your assistanceRegardsClive ChappleAdministratorCottage Home Child and Family ServicesRegistered Charity No in Ireland CHY19092
Opening a drawing created using Microsoft visio enabled you to get Property and Value through the Object Data Tools option.I want to open a drawing from website via pdf.js javascript file and get the data in the same way.Is there a support sdk to access data in drawings via html or web javascript?
First, let me say that I know just enough to be dangerous...so please be kind. FYI - I have Acrobat, full paid, most up to date version.I have created a form and as part of that form I have multiple boxes for inserting photos. I'm using the script event.target.buttonImportIcon(); to insert the photos. I'm aware that in the free version, only PDFs may be inserted. However, I do have the full version. When the box pops up for me to find the photo to insert, it defaults to only showing PDFs. I can change that to JPGs and browse, but this is cumbersome because each time I complete this form I need to attach 12-18 photos for documentation. My question is, Is there a way to have the box that pops up set to view JPGs? Or at least to view all file extensions? I know this doesn't seem like a huge deal, but I do 3-5 of these forms per day, with 12-18 photos each, so it would be nice not to have to change the file type I'm searching for each time.Thanks so much for your help!
During debugging a 32 bit of an existing Acrobat plugin C++ application I received the error messages C2131 (expression did not evaluate to a constant) and E0028 (expression must have a constant value). After commenting out the #include <vector> I was able to compile the file without errors.In order to get the possibility of reproducing these errors I extracted the Bates numbering example from the Acrobat SDK and opened the solution file with Microsoft Visual Studio 2019 (16.3.10), added the include directories of the SDK, added _XKEYCHECK_H to the preprocessor definitions and compiled this example on a Windows 10 computer. I am getting now also the errors E0028 and C2131 also with this example application from the SDK. The selected Windows SDK Version is 10.0 (latest installed version) and the selected platform toolset is Visual Studio 2019 (v142).Did anyone face the same issue?
Hi,I am creating a dialog box and I'ld like some edit_text type elements only accept numbers, and on the fly of course...Is it possible to do that as we can do it with tetxt fields?Thanks in advance for your answers.
I create a form have lot of fields that I would like to have auto tab to next field function, so I don't have to tab each single field. I saw few posts mentioned to use Java Script, but I don't know which Java is correct one to use. I need something allow me to enter numbers and letters. Also I need to know where do I enter the script Format Script or Keystroke Scripts or wherelese. Thank you so much!
Im looking for a way in Adobe Acrobat to highlight all words, of varying length, that contain a hypen and are followed by a period, ie, the last word in a sentence. Examples may be "con-tinued." or "wood-grain.". Ideally this would be part of an Adobe Action so users can easily access. Is this a relatively simple JavaScript?
I have an Excel sheet with lookup tables that I need to convert to a fillable PDF. I am currently using AEM 6.4 to develop the form. I cannot use an external database, the form has to be portable for use by field personnel. I am not new to scripting, but I am not a programmer, this is out of my wheelhouse. Any help is greatly appreciated. My form consists of the following:A user facing page that allows the user to enter values in an expandable table called adj_table. The column I need to use as the lookup value cell is called date, the value I need to lookup is called m_index and is placed in adj_table in a cell called index. We then use the index value to calculate and index adjustment. There are other variables, but solving the index issue will give me a good start and something to work from as an example. In another table that is hidden, we enter the monthly index in an expandable table. The table is named m_table and has the cells m_date and m_index. This table can be upd
Hi, In my form I used an action button to email the form once the required field are filled. If not a message has to appear and the missing field are highligted in red. I used a Script I found in this forum var emptyFields = [];for (var i=0; i<this.numFields; i++) { var f = this.getField(this.getNthFieldName(i)); if (f==null || f.type=="button") continue; if (f.required && f.valueAsString==f.defaultValue) { f.strokeColor = color.red; //Highlights the required fields with red outline emptyFields.push(f.name); } else f.strokeColor = color.gray; //Highlights the filled in fields with gray outline}if (emptyFields.length>0) { app.alert("WAIT! You must fill in all of the required fields before printing this form");} else this.print();At first it seems to work but when I click the message the emai
In short, I want to assign a value of zero to a dropdown field if the user does not choose an item from the list and enters custom text. I have a form with multiple fields. The form calculates the Wheel Tax based on input from three fields. "Wheel Tax Cities" and "Wheel Tax Counties" are both dropdowns that have items with Export Values and allow user to enter custom text. A third field is called "License Plate Fee Dropdown." One of the fields called "Wheel Tax" I have a custom calculation script that sort of works but only calculated sporadically: var t1 = getField("Wheel Tax Cities").value;var t2 = getField("Wheel Tax Counties").value;var PlateTransfer = getField("License Plate Fee Dropdown").value;if (PlateTransfer < 1) event.value = 0;else if (isNaN(t1)) t1 = 0;else if (isNaN(t2)) t2 = 0;else event.value = t1+t2; Wheel Tax = Wheel Tax Cities + Wheel Tax Counties but is zero when there is a PlateTransfer. Thanks for your time
Hello, I've created a PDF formular file with an input field and when the person enter the price then other fields are going to be calculated using the entered number. Everything is working in my Acrobat DC PRO but when I send the file to another person without paid adobe subscription, then the person can enter the number but the brutto and netto fields are not calculating / updating. Is this normal or am I doing something wrong? Or only people with DC PRO become the calculation? Best wishes and thanks in advance
I have form which can be filled out manually or electronically. One section has a comment box with multiple lines "printed" on the page. Since I can't modify line spacing to line up with the printed lines, I would like to have a validation script to fillColor with white when an entry is made in the field (this will cover up the lines) or with no fillColor if there is no entry (which will leave the lines visible). Or it could be phrased the other way around. But I don't know how to write the script to describe a "no color" situation. I found something similar on another post between two colors, but not with no color. , but I don't know how to fix it. .if (event.value == "") event.trarget.fillColor = color.red; //how do i say no color?else event.target.fillColor = color.white; TIA - Michelle
In theory, what I'm trying to do is pretty easy. But I've reached my breaking point trying to figure it out on my own. This is for a project at work that I need to figure out and have ready ASAP. Any help would be extremely appreciated. Every week I am required to visit a construction site and take 35 photos from specific locations for the duration of the project. The locations from where the photos are taken do not change from week to week. Once the photos are taken they are required to be compiled into an interactive PDF that shows a map of the site with each location of where the photograph was taken designated with an icon. That icon should then be clickable to show the image that was taken from that location. I have only been tasked with this for two weeks and both times I've been able to meet their requirements but it's sloppy and labor intensive each time. The first week I simply created a single PDF of the map and all 35 images, each on their own page. Then I added bu
Help please if I need to calculate the difference between two dates in weeks and days.how do I do please ? I have 3 feilds the first "DG", the second "date", the third "age" I can make the diffrenece in weeks or days but not bothplease help meevent.value = 0;var strStart = this.getField("dob").value;var strEnd = this.getField("date").value;if(strStart.length & strEnd.length) {var Start1 = util.scand("dd/mm/yyyy",strStart);var End1 = util.scand("dd/mm/yyyy",strEnd);var diff = End1.getTime() - Start1.getTime();var oneDay = 7 * 24 * 60 * 60 * 1000;var days = Math.floor(diff/oneDay);event.value = days;}
Hope someone can help, I'm new at creating forms and need help with fill and sign. I have created a form for customers to fill in and then sign using a stylus pen. Is there any way in which the form can be set to auto bring up the fill & sign box when the field is selected on the form and automatically set the signature within the field. thanks
I have an 800+ page pdf file with 21 bookmarks. I want to print the whole thing, but have some indicator where the bookmarks begin and end so that I can insert tabs. In this particular case there are no page numbers to go by, and going page by page is very tedious. Therefore, I want to send the whole thing to the copier in one shot but be able to separate the bookmarks. This can be done through slip sheets, offsetting (collating), or even breaking the document up into individual sections. While I've never worked with JavaScript at all, let alone within Adobe - this appears to be my best option. Does anyone have any idea?
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.