Unlock the power of Acrobat SDK through our community.
Recently active
Hello, what I'm trying to do is change the background color of text fields based on a number in an array that matches with the name of the text field in my pdf. The numbers are 0 to 100. So if it is the number 0, it matches with one of the array elements then colors the background based on the first element. Here is the code I'm working on and I can't seem to get it to change the color, any advice on what I could do to make it work? ThanksBrian var colors = [ ['blue', 99,98,95,94,91,90,89,80,29,20,19,18,13,12,11,10,9,8,5,4,3,2,1,0], ['green', 25,17,16,15,7,6], ['brown', 24,14], ['red', ], ]; for (var x = 0; x < 100; x ++) { for (var i = 0; i < colors.length; i++){ for (var j = 0; j< 100; j++){ if (colors[i][j] = x){ getField(getNthFieldName(x)).fillColor = color.colors[i][0]; } } } }
Hi there, Very very new to javascript and still plowing through trying to get my document to work. I have had success with using this code (from George) on a spawn button to spawn two pages as XObjects, and then spawn two pages that refer to those XObjects (saving file space). var aTemplates = this.templates;var T1 = aTemplates[0];var T2 = aTemplates[1];var XO1 = T1.spawn(this.numPages, true, false);var XO2 = T2.spawn(this.numPages, true, false);for (var i = 0; i < 1; i++) {T1.spawn(this.numPages, true, false, XO1);T2.spawn(this.numPages, true, false, XO2);} This did well to shave the file size by over 50%, however I still have to spawn the XObjects each time for the subsequent spawns to have something to refer back to. The document is to eventually spawn 60 pages (30 generations of a two page template), and I thought I was oh so smart thinking that I could further save space by running the script in console to set the XObject pages, and then only app
Hello,I am looking for a javascript code that can save a specific page.The people who will use it all have acrobat reader DCIs this somehow possible because the dc version does not allow extracted pages.Is there another way to do this ?Maybe making a screenshot, or use something else ?I hope somebody can help me
I have a voucher form which when digitally signed, it autmatically inputs the current date in the "Date" field across from the digital signature. The voucher has room for three itemized line listings, with a "Date1, Date2 & Date3" fields at the beginning of each. I want the three subsequent "Date" fields to automatically input the same date I digitally sign the document (pull the same date from the "Date" field), but since I may only have one or two itemized line listings on the voucher, I don't necessarily want the "Date" fields on the empty line items to be displayed. I'm wondering if there's a script to pull data from one field, but only if a different field contains dats. Another thought would be to color code the "Date2" "Date3" fields in some manner that the data displays as "white" if another specific field (i.e. "SubAmount2", "SubAmount3") in that line item does not contain any data, and data displays as "black" if the same specificed field in that l
I've been trying to find some information on how to specifically reference a field name on a spawned page. My goal is to have my "spawn button" only displayed on the last page of the document at all times. I have currently have a hidden button on my spawn template, but would like to find a way to make it visible only on the last page (which is a spawned page). I've been playing around with this tutorial but can't figure out how to make it work for my purposes: https://wordwizardsinc.com/blog/finding-the-fieldname-prefix-on-acrobat-acroform-spawned-template-pages-using-javascript-functions/ Thank you!
I'm trying to create a simple script in which the selectged results in a drop-down menu field causes a specific response in another corresponding field. The "Property" field is a drop-down menu, and the "AccountingCode" field is where I want the specific result to display. The below script is what I entered in the AccountingCode field, but doesn't produce any result: var Property = this.getField("Property").value;if (Property=="property loss/damage") event.value = APC9AA6;else if (Property=="real property loss/damage") event.value = APC9BB6;else event.value = ""; Also, the Property drop-down field contains a blank entry (ie. 10 spaces using the space bar) to create a blank listing as the first entry on the default drop down listing. The purpose is to have the Property field default to blank to cause the employee to make a selection, rather than accidently tabbing through and using one of the pre-listed listings, which if blank, should reflect a blank in the Accoun
Hi I have Adobe Acrobat Standard DC. I want a vba code that can trigger the "EXPORT" to "Microsoft Excel Workbook" option.(see the attched snap) I have around 21k PDFs that need to be converted to Excel. I have tried adobe API references " iac_api_reference.pdf" and "Acro6JS1.pdf" I am intermediate level guy in VBA.
Scenario:I have 5 list boxes and they are linked hierarchically.Continent >> Country >> State >> Capital >> Post code Master list box: Continent names Dependent 1 list box: Country names Dependent 2 list box: State namesDependent 3 list box: Capital namesDependent 4 list box: post/zip codes Continent >> Country >> State >> Capital >> Post code The master list box has 6 continent names and rest of the each list box is populated with 75+ list items for country names, capital names, multiple zip codes within each city. Currently all list boxes from master list box to Dependent4 list box are connected in hirarchy oder and works perfectly.when I select Continent name is Master list box, I get right country names in Dependent1 list box. When I select the specific country in Dependent1 list box, I get the right state names in Dependent2 list box and so on.... Sample Example: 
I am new to PDF forms.I created three list boxes. Master List box, Frist Dependent List box, Second Dep List box.Master List box >> First Dependent List box >> Second Dep List box.I am trying to populate First Dependent List box based on selected item in Master List box. And trying to populate Second Dep List box based on item selected in First Dependent List box.When I select Master List box item, the First Dependent List box items changes accordingly.However I am unable to list any items in Second Dep List box and also unable to view any items in Second Dep List box when I select any item in First Dependent List box. I want :When Master List box item is selects, the First Dependent List box item should change. And when I select First Dependent List box item, the Second Dep List box item should appear/change. Master List Box >> First Dependent List Box >> Second Dep List BoxExample: Europe >> France >> Paris Can anyb
I have a form with 3 yes/no questions. I am using radio buttons (a, b, c). I need to trigger an event -- make a hidden text box visible -- only if the answer is 'yes' to all three questions.I have this code but it doesn't work. Not sure what's wrong. Please helpevent.target.hidden = !( (this.getField("a").value=="aYes") && (this.getField("b").value=="bYes") && (this.getField("c").value=="cYes"))
How can I embed multimedia (video and audio files) into a PDF that could be viewable offline? I am trying to make a PDF document for people to download before they hike a trail. In the document there will be the usual text and images, but also, I want it to provide video and audio. How can I do this so it may be completely viewable offline? Or is is this not possible?
I'm trying to make something like database.I use code in document level scriptvar fruits = {Apple:{ Color: "Green",Size: "Medium",Weight: "50" },};function SetFieldValues(fruits)I set fruit function in dropdown field where I select fruits ( in this case apple).Now I want to add text field with numbers to use same function, how to set my code so it depends on two fields(dropdown = fruits and text field = numbers)something like this:var fruits = {Apple, 1:{ Color: "Green",Size: "Medium",Weight: "50" },2:{ Color: "Red",Size: "Large",Weight: "80" },};How do i make it work?
I have an Adobe fillable form that I like. It was created from a Word fillable form that I imported and modified extensively. There are square shapes that were improrted for word (intended for checkboxes but only the square ouline imported). In adobe, I want to remove the square shapes to use the space for radio buttons. The radio buttons cannot be larger than the length and width of the squares to fit properly. therefore the corners of the underlying boxes show. Is there anyway to remove the imported squares? The squares are not selectable by the selection tool to delete. Ideas? I an using Adobe Acrobat Pro DC.
HiI'd really appreciate if someone could help me.I already have a script that will automatically fill non relevant fields a black colour when the user selects 'Contractor' from the drop down options. However I need other fields to be filled black if the user selects the other drop option 'Team Member' such as Manager Name and Job Title fields, etc.Can I add something to the below script to include this?var fields = ["Currency", "Salary", "Sal Basis", "Salary R", "Sal Year", "Per", "Per F", "Pro Day", "Pro Mont", "Note Day", "Note Mont", "Per", "Company Car", "Car Allowance", "Fuel Card", "Fuel Allowance", "PlanType", "LocalBonus", "Sub Plan", "Annual Target", "Target Amount", "Healthcare", "Local Healthcare", "Life Insurance", "Employee", "Employer", "Charged Segment",];//for (var i in fields) {var f = this.getField(fields[i]);if (event.value!="Contractor") {f.required = true;f.fillColor = color.transparent;f.readonly = false;} else {f.required = false;f.fillColor = color.black;f.reado
Hello all, So if necessary, since I know I can get a little long winded I put a tl:dr at the end. Thanks for your patience if you read all the way through!! I am working on modifying/improving a pdf form utilizing checkboxes that would communicate to other checkboxes, where the other checkboxes provide a total score. This is for conducting an evaluation on a given process.... What I'm trying to do is get a script so that if there are 5 requirements that need to be met just to receive the check that indicates pass instead of fail (multiple pass/fail events across the board). The trick is, if just any one of the 5 requirements is missed the check is not received, indicating that the entire event is failed. I'm hoping this is a clear enough scenario for someone to provide a base script that I can integrate, and maybe even build off of. I can read java, but have a hard time building without a base. Any help is greatly appreciated, and thanks in advance!! tl:drtrying to obati
After doing some research yesterday, I did notice that javascript should help me with this question but I have never written a script and I struggle with the concept when reading some directions as I have a form that I am making fillable and when you read their examples the questions do not show until the individual selects a box and checks it. On a form, most of the information is in front of them already so they will see it either way. I work for a Michigan intermediate school district (ISD) and currently I am making HR forms fillable. I have a question in section 1 of the attached file that has 2 checkboxes the person must select 1 or the other. Question A. is only a checkbox, but if the person selects B., then follow-up questions must be completed. How do I add a condition to lock B. checkbox and questions, if A.? If B. is checked, how do I group the questions so the person completing the form completes the required fields for B.?
Hello dear comunity,what possibilities are there to find an empty space (without characters and lines) in a document, for example a drawing, automatically via JavaScript to set a annotation with known dimensions? I have already found a more or less common solution via getPageNthWordQuads and going through all words, but drawn elements are of course not covered by this. The annotation will be placed, but covers parts of the drawing.Thank you very much in advance!
Without going into the details, I accidently clicked on a malicious pdf from an email. Warning boxes popped up asking me to allow or block access. I panicked, opened the task manager and clicked end task on all Adobe processes. Do I need to be worried that malware was installed on my computer or did killing the process before I allowed (or blocked) access stop the process?
Hi. I have a script that is meant to crop a pdf permanently by setting the media box to the crop box.However when I run it I get the following error:for(var i=0;i<this.numPages;i++)var rCrop= this.getPageBox("Crop",i)this.setPageBoxes("Media",i,i,rCrop)TypeError: Invalid argument type.Doc.setPageBoxes:1:Console undefined:Exec===> Parameter nStart. any help would be much appreciated.Thanks
I know you can set a portfolio in the way that the "Cover Sheet" is displayed when the portfolio is open. In my use case I have one pdf file as "Cover Sheet" and a folder with other pdf files. Is there a way to force that the "Cover Sheet" is displayed when going back on the top level of folder? Becauce after working with files in folder and going back the "Cover Sheet" can be displayd only from view menu. Javascript would be also solution. The reason for this that I would like to allow user to review the files in folder and after than sign the complete portfolio, which as far as I know is only possible from "Cover Sheet".
I have two template pages that are spawned successfully 1 time each with this code I extracted from the SDK:var a = this.templates; for (i = 0; i < a.length; i++) a[i].spawn(this.numPages, false, false); Unfortunately the file size became rather large with multiple spawns, so I then tried to generate them as XObjects using the code also found in the SDK as it indicated it could reduce filesize; I tweaked the code below to only spawn one time by changing the 30 to a 1. var t = this.templates; var T = t[0]; var XO = T.spawn(this.numPages, false, false); for (var i=0; i<30; i++) T.spawn(this.numPages, false, false, XO); The problem I am having is that it only recognizes one of my two templates and never spawns the second one. I have tried several different things -- all found on the internet and in the SDK as I'm quite the learner at this -- and hav
Hi, We have an application hosting the WebBrowser control and we have some very large enterprise customers who use it to view PDF files. They have been running into a very consistent crash in PDF reader but only when full Acrobat is installed. I created a very minimal WebBrowser control application and I can reproduce this crash, but I can't tell why Acrobat is crashing. The crash always happens in RtlEnterCriticalSection as it is called from Acrobat.dll. We have multiple dump files (although they all look the same). Can I get someone from Adobe to help us debug this issue? Would it be possible to get debug symbols for the Acrobat.dll to get a better idea of what might be happening so we can try to find a workaround? We did find that if we left a pop-up open with Acrobat loaded then the crash would not happen in subsequent pop-ups, so we were pursuing that as a workaround, but we then found that the workaround doesn't work if the pop-ups are loa
My PDF includes 10 pages total, with two of those pages being fillable forms near the end of the document (no signatures included). Both forms have their own submit button. I am trying to find a way to use the submit button to email only the one form that the client chose to fill out. The way I see it, there are two ways this could be accomplished:-Have the submit button only send one page of the PDF, instead of the entire document (I've seen in a few different places that this is impossible)-Use JavaScript to construct an email, and populate the body of the email using the form fields. (I'm sure this is possible but I've no idea how to script this) Emailing the forms as .tmp or .fdf files, etc. isn't an option because it is intended for less-than-tech-savvy users. Can someone point me in the right direction?
I am currently trying to help someone with an adobe problem without being too experienced in it myself. I was working on a different machine via zoom and trying to try and replicate the problem but I was unable. By not working as it previously he means the "who needs to sign" feature (I will attach pictures)When he clicks the Fill and Sign tool it does not give him the option and sends him directly into to sign the form.Had him sign out of the creative cloud and close all apps and reopen.With my up to date version of adobe on my machine I was able to access the “who needs to sign” feature before signing the formHad him update his version of adobe and verified we were on the same version.The problem continued for him but worked correctly for me on the same adobe version.Uninstalled adobe from the cloud and checked for other versions on the machine.No other versions on the machine.Reinstalled adobe and the problem still persisted.Checked adobe signature preferences and did not find
I am new with automation to adobe I have a pdf file that is created by a third-party appThe pdf file contains elements that when the user click on them a popup menu appears. I want to interrupt with the menu item or add a new menu item which perform an action when clicked. I dont care if the code is implemented with Visual Basic, C#, Java, JS, VBS or in any other langue. What are the tools i should use (Acrobat SDK, pro license of adobe...) ?
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.