Unlock the power of Acrobat SDK through our community.
Nyligen aktiv
I have thought of two approaches to this because my folder with 2000 PDF files contains many files that only have one page. 1) Somehow find a way to determine the PDF files with more than one page, then run a script to extract and save the first page of every PDF with > one page i.e., to another folder.2) Run a javascript in Adobe Acrobat XI to extract the first page of all 2000 PDF files in my folder and save the resulting PDFs to another folder.I wish if possible to do this without all 2000 PDF windows opening up during the process---which will no doubt crash my computer if I try to do this will all 2000 PDF files!So far, I have tried using the Action Wizard which carries out 3 steps:Execute JavaScript: this.extractPages(0);Delete pages:from 2 to 3SaveAdd to original file name a "1" after the original file nameOutput: PDFIf I do it like this, all the files within my folder start to open. I ended the task before anything like 2000 PDFs were opened. Also, this delete option failed a
I cannot identify why I am receiving this message:ERROR MESSAGE: RangeError: Invalid argument value.Field.display:2:Field rdo.Trid:Mouse EnterSCRIPT: this is a mouse enter script attached to a radio button and manipulates the text field, "txt.HelpPage6".var help6 = this.getField("txt.HelpPage6"); help6.display = display.visible; help6.value = "\rNOTE: Although the lender's and owner's premiums will populate automatically when you click here, you may change their values in the 'Premium' field in the cost columns of Section 17.a. or 17.b. To reinstate the auto-generated premiums simply click here again."COMMENT: This script worked just as intended for three days before this error surfaced and no changes have been made in the relevant fields.
Hello all, So I have a problem with calculations and pre-filled values from an external website/program. In my case, I am uploading the form to a web-based program. When printing the form from there, it should auto-fill the form with the data it has inside the system. This works fine for single values, but not for calculations. So let's say the example is: Value 1: form code 'value_1' -->external system will automatically populate it with the value 'x' (number)Value 2: form code 'value_2' -->external system will automatically populate with the value 'y' (%)Value 3: should be the sum of Value 1 x Value 2 y, so: value_1 times value_2 = xySo before printing the document, all fields are empty. Only when printing, they should be populated with all 3 values. However, when I try to do this, the calculation never works. What I have tried so far: - Formatting the fields to percentage, numbers etc,. -->no effect- Maintaining the calculation in the extra settings tab -->does not calcu
Good morning,I have two codes that I've used to do similar functions, but I'm having trouble combining them.This code:var emptyFields = []; for (var i=0; i<this.numFields; i++) { var f= this.getField(this.getNthFieldName(i)); if (f.type!="button" && f.required && f.display==display.visible) { if (f.valueAsString==f.defaultValue) { f.strokeColor = color.red; emptyFields.push(f.name); } else { f.strokeColor = color.transparent; } } } if (emptyFields.length>0) { app.alert("YOU MUST COMPLETE THE FO
As we all know, when we view PDFs with Acrobat, by using Shortcut keys "Ctrl+F", we can find the words we wanted. But I noticed that, if the words, especially Chinese characters, sorted in other order, it doesn't work well sometimes. The text layout is usually from left to right and top to bottom in the page, however, the text can be scrambled in order to achieve a beautiful design effect. If the words were arranged in a more complex form, when we wanted to find them together, the effect was not satisfactory.Please look at the following screenshots:In the PDF file, there are two famous Chinese poems, "年年有今日" & “岁岁有今朝”. The former three pictures showed that by using "Ctrl+F", each Chinese character in "年年有今日" could be found. Theoretically speaking, all the characters in "岁岁有今朝" should be found in the same. Unfortunately, as the latter two pictures show, the Chinese characters in a horizontal arrangement coud be found, while none could be found in a verticle lines arrangement. In oth
Hi,I've been experience this particular problem, it seems that every time I sanitized a PDF the size increased from 4MG to 44.5MG. I'm sanitizing the pdf directly from Adobe Acrobat. Does someone knows a better way to sanitized a pdf without increasing the size (no more than 10MG max.)?Please comment if you have a solution.Daniela
So I have an email in outlook, using PDFMaker I've appended the email to an existing pdf portfolio. The fields displayed in this portfolio are From, Subject, Date, Attachments, Size. The append to Adobe pdf function populates these fields in the portfolio correctly for the imported pdf converted email. What I need is to be able to do that programmatically through VBA or JS.I'm using VBA to convert hundreds of emails to pdf and then append them to the associated pdf portfolios. I'm using the JS object to run importDataObject on the portfolios to bring in the email pdf. This requires privilege and I'm 95% certain I've figured that part out using the JS console in Acrobat. What I can't figure out is setting the field values for the portfolio.I can take the appended pdf from the PDFMaker function and extract it, 100% intact, and re-add it to the same portfolio and all of the field data is wiped. All I see in the From field is the name of the pdf. So it can't just be a matter of setting the
I downloaded "Adobe Acrobat XI SDK for Windows" on the official website and tried to compile the sample "BasicPlugin" with VS2015 on Win7, but the generated API file is incomplete and the Output window does not prompt the PDB file generation. Then I trid again with the same IDE on Win10, it worked. Here are some screenshots:VS2015 on Win7VS2015 on Win10I wanna know what caused the difference? Please do not hesitate to enlighten, thanks!!!
HiI have searched the forums but can't find the answer to my question so I'm hoping someone on here can help.I have a form in Adobe XI with a number of grouped radio buttons, if a user selects N/A on Section 1.1 I want all the subsequent questions in section 1.1 to auto populate the N/A radio button but if Yes or No is selected they should be able to select a radio button on the other questions. Ideally, if N/A is selected they should also see a message telling them to go to the next question.My form will look something like thisSection 1.1 - If N/A is selected all other questions in the group will all populate with N/A and a message will appear telling the user to go the next Section. Alternatively if Yes or No is selected the user should select a response to the other questions.Can this be done? I'd appreciate help on this one, I'm still a novice but have picked up some really useful information on this forum.Ellen
Hello. I am using javascript to read a data file to populate and save a large number of PDF forms (about 2000). The script works perfectly and populates the form fields with the data in the file. I then need to send each form out to be signed (using Adobe sign). This works perfectly as well. However, I would like to pre-populate the Signer's Email in the Signature field using the signers_email from the data file as each form is created from the data file.I cannot figure out how to do this in the Javascript. Right now I have to enter the email address from Adobe Sign. This is tedious AND may lead to typos! Any ideas?Thank you!PS If I manually enter the Sender's Email in the field properties (directly) and then access Adobe Sign, the email address is auto-populated in the To: line. So...how do I programmatically assign a value to the Sender's Email field (via Javascript) using signers_email from data file?Manually entered Signer's Email in Field PropertiesAdobe Send automatically populat
I've created a time sheet and it's in a PDF format. On the top of the form I have a From and To field. If someone enters 10/13/2018 in the from field, I need the To field to populate a date 14 days after (10/26/18). I also would like for the dates within the time sheet to populate. For example: Sat would populate as 10/13/2018, Sun would populate to 10/14/2018, Mon would populate to 10/15/2018 all the way to Fri. Below is an image of the time sheet. I've found JavaScripts online so I know it's possible. My issue is formatting the script based on where the names of my fields need to go. If someone could please provide the script and within the script show me where I enter the field names that would be greatly appreciated. I have never done this before so it's like learning another language.
Hey guys,Hope all is well.I am facing an issue with protection and hoped someone could help.I have the below code working fine to generate a .txt file and saving it with a specific extension (.dbk).The issue I have is, I can only generate the file if my pdf is unprotected (i.e., I have to leave the security settings to "Any changes allowed, except extracting pages).Is there any way I can prevent the user to be able to edit the file and, at the same time, allow him to run the below code?All help is greatly appreciated!var cMyC = this.getField("DecRec").value;var cpf = this.getField("CPF").value;var NR_CPF = cpf.slice(0,1)+cpf.slice(1,2)+cpf.slice(2,3)+cpf.slice(4,5)+cpf.slice(5,6)+cpf.slice(6,7)+cpf.slice(8,9)+cpf.slice(9,10)+cpf.slice(10,11)+cpf.slice(12,13)+cpf.slice(13,14);var retif_sim_nao = this.getField("Tipo_Declaracao").value;var ret_ori = "";var save_exerc = this.getField("Combo_Exercicio").value;save_exerc = save_exerc.slice(10,14);var save_anobase = this.getField("Combo_Ano-C
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.
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
Har redan ett konto? Logga in
Har du inget konto än? Skapa ett konto
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.