Questions
Recently active
Hello.I have this// Get field values as numbers v1 = +getField("Text8").value;v2 = +getField("Text9").value; v3 = +getField("Text11").value;v4 = +getField("Text12").value;v5 = +getField("MtaBO_Kal_nepoia8LaTWV_TOI1IK6V_110VQTUWVOTnV_flep").value;v6 = +getField("MtaBO_Kal_nepoia8LaTWV_TOI1IK6V_110VQTUWVOTnV_flep0").value;v7 = +getField("MtaBO_Kal_nepoia8LaTWV_TOI1IK6V_110VQTUWVOTnV_flep1").value;v8 = +getField("MtaBO_Kal_nepoia8LaTWV_TOI1IK6V_110VQTUWVOTnV_flep2").value;v9 = +getField("MtaBO_Kal_nepoia8LaTWV_TOI1IK6V_110VQTUWVOTnV_flep3").value;v10 = +getField("MtaBO_Kal_nepoia8LaTWV_TOI1IK6V_110VQTUWVOTnV_flep4").value;v11 = +getField("MtaBO_Kal_nepoia8LaTWV_TOI1IK6V_110VQTUWVOTnV_flep5").value;v12 = +getField("MtaBO_Kal_nepoia8LaTWV_TOI1IK6V_110VQTUWVOTnV_flep6").value;v13 = +getField("MtaBO_Kal_nepoia8LaTWV_TOI1IK6V_110VQTUWVOTnV_flep7").value;v14 = +getField("MtaBO_Kal_nepoia8LaTWV_TOI1IK6V_110VQTUWVOTnV_flep8").value;v15 = +getField("MtaBO_Kal_nepoia8LaTWV_TOI1IK6
Adobe Acrobat - how to Execute document level javascript from folder level javascript
I have a client with an external file upload Web application that used to work with InfoPath forms. The client came to me to build 508 compliant PDF versions of the InfoPath forms so that they could discontinue them. I found out later that the form submission process included uploading to a Web application that apparently only accepts image (JPG, GIF, TIFF, PNG) and it looks like static PDF forms. The form that I produced for them using LiveCycle came out great, but now we're dealing with how to get this additional upload step; and of course, the people that work on the external Web application aren't flexible with their technology. Other than the aforementioned image/PDF formats that it does accept, I don't know what server-side technology they're using to upload files (PHP, Classic ASP or .NET, etc.) or the database type (or if it even uses a database - I'm assuming it does, though). You know the client doesn't really know, so it's all kinda on me to provide the best solution.I've lo
Thank you George Johnson for the help on my initial question!!! I made the suggested changes and worked perfectly on my machine. I then tried to move it over to the office and I'm sure I've done something screwy because it will no longer save.This is the "trusted" (I'm hoping) js doc, which I have in the Acrobat Javascript file; also in the folder where the saved forms should be going AND in the folder containing the original doc.:var mySaveAs = app.trustedFunction( function(oDoc, cPath, cFlName) { // Ensure path has trailing "/" cPath = cPath.replace(/([^/])$/, "$1/"); try { app.beginPriv(); oDoc.saveAs(cPath + cFlName); app.endPriv(); } catch (e) { app.alert("Error During Save - " + e); } } );I believe one problem is the "cPath" part of that script...but I'm a novice and not sure what to replace it with.Trying to save the completed form (applicant pressed a SEND button, which runs the JS associated with the
Javascript newbie here,,,and thanks in advance for any help.I am simply trying to add a couple of spaces when using a javascript to save a file. The file is an employment application which is named "Phoenix Employment Packet.pdf" When an applicant presses the SAVE button, I would like the saved file to go into a specified network folder with a new filename using the "last name" and "first name" fields of the form.Everything seems to be working fine, except I cannot get it to save WITH spaces. For example: Fred Smith fills it out and saves. The resulting file name is: smithfredapplication.pdf instead of: smith fred application.pdf. or even better yet, smith, fred application.pdf. Here is my code. Any help is greatly appreciated.this.saveAs("/c/APPTESTFILE/" + this.getField("lastname").value + "" + this.getField("firstname").value + "" + "application.pdf");Oh...running Adobe Acrobat Pro DC no Win10 64bit
Good Afternoon,First of all, when I've posted questions on coding JAVASCRIPT people have been amazing as I learn (I'm a novice). I appreciate any and all feedback. I have a form that I've been working on and so close to being finished with it. I keep getting an error "the value entered doesn't match the format of the field". I've tried but cannot not figure out how to resolve this issue. The scenario involves a % issue. I have 3 separate lines that have a % as a result for answer. The results are considered: Step 1 ("F7"), Step 2 ("F10") and Step 3 ("F13"). If Step 1 has a result that a percentage will appear. If step 1 is not used then the answer will appear as 0%. Same goes for Step 2 and Step 3. Step 4 ("F14") and this is Step 1 + Step 2 + Step 3. So, if the result was 1000% then the result would be 3000%. Step 5 ("F15") is Step 4 / the number of steps is used. So, if Step 1 is the only the div
Hello everyone! It's been quite some time since I've posted a Javascript question. I've spent hours trying to figure this one out and unfortunately I'm stuck! If anyone can offer and suggestions/solutions to my isse I would greatly appreciate it. My goal is simple, writing the code is difficult. The scenario is: I have two fields that I'm looking at. B231 and B232. If B231 is $10 or less then the answer is $0. If B232 is $10 or less the answer is $0. If B231 is greater than $10 then the answer is B231. If B232 is greater than $10 then the answer is B232. If either B231 or both are greater than $10 then I need the answer to be the higher of the 2. I can't figure this out for anything. I began writing the script but cannot figure out where to go from here. Hopefully this make sense to someone! var theField = this.getField("B231");var theValue = theField.value;var theField2 = this.getField("B23
I need to format a series of numbers with - between each 3 digits.Easy to do with a simple REGEX, my difficulty is to know how and where to put a javascript to make the content of a field to display with the -ThisTo This99999999999-9999999999-999999999999-99999999999-999-999Possible... I can get some help on this. Thanks!
I am trying to create a bookmark with a JavaScript function attached to it. I have done that. It is under a parent bookmark called Schematic Tools.My problem is that the iterations of my for loop are off. I'm not sure what I am doing wrong. The layers I am looking for will ONLY exist on odd page numbers (odd being based on the page 1 is page[0] so they are on pages 2, 4, 6, 8, etc..var onPage = 1;var usablePages = [];for (var z = 0; z < this.numPages; z++) { if (onPage <= this.numPages) { usablePages.push((onPage + 1)); onPage += 2; }}// Array of all of the layersvar ocgArray = this.getOCGs();// Create a header bookmark for all isolation tools to go underthis.bookmarkRoot.createChild("Schematic Tools");var headerBookmark = this.bookmarkRoot.children[0];headerBookmark.style = 3;// Alphabetize the layersocgArray.sort();for (var z = 0; z < usablePages.length; z+
Hello Adobe TeamWe are interested in a project, creating PDF Portfolio document from Memory Stream (Images saved in SQL Database in System. Bytes format) . Currently we are using Visual Studio 2017 (Vb.Net desktop) and wanted your advice on compatibility. If it is possible, is there any technical support for the functionality. Hoping to hear soon from you. Best RegardsJP
I have a form with multiple date fields (5) that need to be validated against one "first" date field. I haven't been able to get it to work with the scripts that I've found online.Hopefully the screenshot that I'm including makes sense.All of the date fields following "Date first case became ill" cannot be dates before that date.I appreciate any help provided.
i want to create a if command so that if field D1 has anything typed into it then another field Dropdown1 becomes required but dont know how to write it out for adobe pdf form. Any help would be greatly appreciated.
HiI have 4 fields. "Blank Check" is a Y/N dropdown"Mark Up" is a list of percentages"Check amount" is a free text field that only accepts numbers"Billable Amount" multiplies "Check Amount" and "Markup" and adds that to the value entered into "check amount" for a total.What I need to do is create a formula that automatically runs the same calculation, but adds $1.00 to the total, to flag an amount to be adjusted later. The formula I am using as of now is CheckAmt * MarkUp + CheckAmtAnd this is the formula I have tried if(this.getField("BlankCheck").value="Yes")event.value=("CheckAmt")+1Any help would be appreciated.
Hi,I am developing a c# code trying to implement pdf editor. I need a page to show the pdf and allow the users to add annotations, redact and save the pdf. Can you help with a sample code. Please guide with the steps that need to follow to get it working in C# web application page.Please help me to how to have the editor tool with all the menu items.
How can I create these bookmarks into a structure that is Tools > No Color, Black (Ground), 032 (Red) (Battery Power) (Bookmark names under the Parent bookmark Tools). Then I also need to have it add a javascript to the bookmarks (ie No Color bookmark would run a function noColor();)I found a tutorial I believe Thom Parker created on creating bookmarks....but being fairly new to javascript in Acrobat I don't think I really understand what his function is doing.var checkedOne = 0;var checkedTwo = 0;var checkedThree = 0;var foundLayers = [];var ocgArray = this.getOCGs();for (var i = 0; i < ocgArray.length; i++) { if (ocgArray.name == "No Color" && checkedOne == "0") { foundLayers.push(ocgArray.name); checkedOne++; } if (ocgArray.name == "Black (Ground)" && checkedTwo == "0") {
Hi,i hope someone can help.I have PDF files that i want to merge, the problem is that the fillable Fields are all same have.After merging all fillable Fileds have the same valuesKind regards
I have a portfolio with several forms. How do I make the portfolio link the required fields to mirror one text field? For example, in all of the forms I'd like text fields "owner's_name" to all reflect the same entry. The same goes for text fields "owner's_location" and "project_name". Thanks in advance!
I would like to see if anyone is able to provide some assistance with configuring the Default State within the Layer Properties to always be "off". I create PDF's from AutoCAD that contain several layers (more than 50) that I would like for them to initially be turned off and then have the option to turn them on one at a time. Currently when I create the PDF's I manually go into the layer property for each layer and manually set the Default State to OFF. However this is very time consuming and when modifications are needed to the project and new PDF's are created this process is started all over again. Thus taking hours to perform a simple task. I am hoping that there is someone that can provide some assistance with how to automate this simple task or maybe there is a configuration setting that I just have not discovered to set this value to off as a standard default setting.
Could someone please assist. I am getting a syntaxerror:illegal XML character 1: at line two on the following script:var oMyDoc = <... PDF being operated on ...>app.execMenuItem("Save", oMyDoc) ;Thankyou in advance
Hi everyone.I´ve got this problem that one of my check boxes didn't hide again after clicking on my reset button as it should do.The code behind of it is this one:this.getField("box").display = (this.getField("s").isBoxChecked(0)) || (this.getField("s+r").isBoxChecked(0)) ||(this.getField("g").isBoxChecked(0)) || (this.getField("g+s").isBoxChecked(0)) ||(this.getField("g+s+r").isBoxChecked(0)) || (this.getField("o").isBoxChecked(0)) ||(this.getField("o+").isBoxChecked(0)) ? display.visible : display.hidden;So it should just hide or show on the choice of the user. Can someone see what I'm doing wrong?I'm sorry for my bad English.
Hello. I'm going to preface my question by admitting up front that I have *zero* knowledge of JavaScript and I have spent the morning searching the web and this forum for answers to my questions but nothing has worked so far.I'm trying to create a form for my leasing agent (who somehow manages to corrupt my Excel spreadsheet despite password protection AND locked cells) for his leasing commissions. I have a drop down field called "DealType" where he can choose the options "New Lease / New Tenant", "New Lease / Existing Tenant" or "Lease or Option Renewal". He then goes along and enters the rent components, which I have subtotaling into a read-only field called "TotalRent".I want to create a read-only field called "CommissionDue" which would read something like this in Excel-speak:If DealType="Lease or Option Renewal",TotalRent*50%,TotalRentUsing articles from Thom Parker, I put this script together:event.value = "";var a = +this.getField("DealType").value;var b = +thi
I have three fields in my PDF form.1st Field : CurrentDate (format date)2nd Field : Number of Days (format numeric)3rd Field : ExpiryDate (format date)What I would like to happen is when I input a date in CurrentDate, the ExpiryDate will be computed using the formula below:ExpiryDate = CurrentDate + Number of DaysThanks in advance.
Hi,I wondered if it is possible to do the following:a.) Connect to a database using the ADBC object and loop through the records.b.) If there are 2 fields in the database 'FilePathAndName' and 'ActionScriptName', can I loop through the records, opening each doc object and running an Action Script based on it's name.ThanksThe ADBC object is used in conjunction with the connection and statement objects to interface with a database. These objects constitute Acrobat Database Connectivity (ADBC), and provide a simplified means of using ODBC calls to connect to a database and access its data. SQL statements are passed to thestatement object’s execute method in order to insert, update, retrieve, and delete data.ADBC
hello all,I used Adobe Reader AstiveX ,1.loadfile XXX.pdf2. Printallthen show a warning ,like this how to disable this warning ,i dont need it .thank u
I have a script execute upon form signature that attaches the saved form to a new email and fills in the subject and part of the body. On the previous version of Acrobat Pro DC this worked great. We just updated to 2019 and the same script now attaches the FDF rather that the PDF. What do I need to change in the script to make that happen on a user's machine?For reference, the script is below:this.mailForm(true,"deptmail@company.com","","","Form submission");I know I can select the format to attach when using the 'Send Form' action, but this needs to be scripted so I can modify the subject and body of the email.Thanks!
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.