Unlock the power of Acrobat SDK through our community.
Actividad reciente
Hello everybody,I would like to create a PDF form which can only be saved with a button (Javascript!). Not with "Ctrl + S" or the menu command "Save". How can I realize that when opening the document, "Ctrl + S" and the menu command are deactivated and that saving after changes to the form only works via the button?Is that even possible? Thanks in advance for all helpful answers.
Can someone help me come up with a console code that prints the name of each field? I had it just hours ago, and I cannot locate it again, nor come up with it on my own.
For my project, I have pages spawn from a template. I use a hidden form field containing a count variable which I append to the names of spawned fields and increment. There are fields such as topPh#, topCap#, etc. These numbers may or may not match with page numbers or be in sequential order. How can I make a loop that will go to each page and collect topPh# etc. regardless of the integer there? I also would want to have a list of the # values in order. I used regular expressions to do something similar: var num = event.target.name.match(/\d/g).join(''); this.getField("botPh" + num).display = (event.target.value=="Off") ? display.hidden : display.visible; this.getField("botCap" + num).display = (event.target.value=="Off") ? display.hidden : display.visible; But in the above case, my target widget has a number on it (e.g. togBot5), and it talks to other widgets with the same number (e.g. botPh5), regardless what the number is.
This is a stub from a project. My goal is to look through all the fields in the document, then put any of them whose name begins with "topPh" (they all end in numbers) into my array fields[]. I'm still researching how to decide which names conatin the substring for the if statement, but in the meantime I am testing using this: var fields = []; for (var i = 0; i < this.numFields; i++){ var f = this.getField(this.getNthFieldName(i)).name; if(f = "topPh2") fields.push(f); } //end of for loop app.alert(fields);I expected it to put one value in fields[]: topPh2. It seems to be doing it many times. In fact, I crashed Acrobat through console doing something similar. This is what it puts out: What am I doing wrong here?
Is there a way to set a text field format to special > phone using Javascript?I'm trying to find something in the SDK, but haven't seen anything thus far in field properties or field methods...I didn't know if there was syntax for setAction perhaps...I know I could use regex, but the integrated phone format works perfectly for my needs.I simply prefer to create a master script for the forms I develop and run it all from the script in the console.
Hello all! I'm hoping this is a fairly easy task. I'm fairly new to Acrobat and using JavaScript, but I've managed to get pretty far just from "Googling" for my answers. I'm not quite sure how to word this one, so, I'm turning to you guys for help. Here's the scenario... I'm creating a fillable PDF, to be used as a timesheet. This document will allow employees to document their hours worked daily (or vacation time taken, comp time taken, etc.). I have several columns, but the three most important ones for this are "Hours worked, Regular OT, and Comp OT". In our department, employees don't hit overtime until they've worked 43 hours. Once they hit 43 hours, and time over that can be taken as Regular OT (paid to them at 1.5 time), or Comp OT (added to their compensatory time bank at a rate of 1.5). Here's what I want the form to do, if possible. As an employee is entering their daily hours, I want the form to calculate the hours from the previous days, and include the
I'm working on adding features to the attached document. The intent is for techs to be able to open the file, fill it out, and generate a report. One feature that would be very useful would be to delete a photo in the middle of the document (easy part) and have the photos below it each move up. This will mean moving the top photo/caption of one page up to the bottom of the previous page, moving the bottom one to the top, rinse, repeat (hard part). How can I best achieve this?
I know already that OCGs (optional content groups) describe Layers and Watermarks.Are there other common elements within a PDF that are also OCGs?(If it helps with your response I'm a user, not a developer, and generate layered PDFs from InDesign. I'm wanting to script some basic reporting tasks like creating a text list of all named layers.)Thanks!
This works fine in the Javascript area of a pdf document:this.exportAsXFDF({cPath:"/C/My folder/2020/File.XFDF",bAnnotations:true}) But I don't know how to change the C/My folder/2020/File.XFDF to The User's Document folder/2020/File.XFDF?
Hello,I have a form that a user will select if a specific item is for a member or non member (with associated price discount for members). They also have to enter a Quantity. There is then a total amount field that gets automatically calculated. I have part of this working but would like the Total amount field to go back to being null if the user unchecks the Quantity and Member or Nonmember checkbox. Here is the code that I currently have:if (this.getField("511 Digital Access Code Ckbx").valueAsString == "No") event.value=(this.getField("511 Digital Access Code Qty").value * 40);if (this.getField("511 Digital Access Code Ckbx").valueAsString == "Yes") event.value=(this.getField("511 Digital Access Code Qty").value * 20);if (this.getField("511 Digital Access Code Qty").value == null) event.value=(this.getField("511 Digital Access Code Total").value == null);if (this.getField("511 Digital Access Code Qty").rawValue.length == 0) event.value=(this.getField("511 Digital Access Code Total")
When I custom format a text box with Date/ Custom/ mmmm d, and choose a date with other than the current year, and return to it, it has reverted to the current year. I have a field next to it for the year of what they picked, so it needs to be accurate. Entry - 12/1/19 Reverts to 12/1/20 -
Hello, this.setPageRotations(0, 0, 90); doesn't want to execute because of security settings in Adobe Acrobat Reader DC. Same code works in Adobe Acrobat Pro DC.Enable global object security policy is off and Enable enhanced security.
I'm getting the above error when I try to hit "okay" after editing a script in a field. The offending lines are://set properties of check box togBot.strokeColor = color.black; togBot.fillColor = color.white; togBot.setAction("MouseUp", "this.getField("botPh" + spwn).display = (event.target.value=="Off") ? display.hidden : display.visible"); The parentheses match up, and the code matches a very similar (working) one elsewhere in the script. What is going wrong? Thanks!
Does anyone know if a field can populate a result of PASS/FAIL/COMPLIANT based on a GREATER THAN or LESS THAN number? Ex: below 10 - field should show text True or false
I have a checkbox named 'NoLieu' and a dropdown list named 'AbsenceType'. Is it possible to display an error message and/or disable the user from being able to check the box if the user selects from one of the options in the Absence Type dropdown list? Even better, if an error message could also appear if the user checks the No Lieu box first and then selects an option from the Absence dropdown list too. I don't want them to be able to check the 'No Lieu' box at all if they select an Absence Type option.Thanks!
I'm considering convincing my company to upgrade to Acrobat Pro so I can automate the processing of my scanned documents. Before I bring it up, I want to make sure the things I want to do are possible. I don't need anyone to give me the code, I just want to know if this is possible. The documents i'm working with are landscape, 2-5 pages, and have the filename and page numbers in the footer. I want to scan a big stack of them and have a script perform the following actions: Use OCR to acquire the filename and page numbers for each page. I would like to restrict the OCR to only look at the footer to save time and RAM.Using the filenames, I want it to detect when one document ends and the next one begins so they can be split into separate files. Alternatively I could separate my documents by number of pages and scan them in separate stacks, but I would to have an input box to tell the script how many pages each document has.Before saving the split files, check that the number o
Is it possible to hide content that was spawned from a page template using bOverlay?I'm trying to create a single form that has similar content but will spawn new contend based on selection in a combo box. I'd rather use spawn and page templates as a lot of the background elements will change depending on selection.Spawning works great, but I'm unsure if it's possible to remove a spawned template contents after spawning it. I could hide the fields but not the background page data. I think replacing bg data also would require advanced usage rights I don't want to mess with.The other option would be to create background elements as read-only buttons and scrap the spawning idea, but it's not as clean as I'd like it to be. It's my number 1 fallback, however. I'd also rather not mess with the rect property. It annoys me.Another idea I was toying with is if it were possible to create a template out of page 1 and spawn the template as default, then create a trigger from the combo box (if it's
Hello, I created a drop-down list and a text field, I automatically fill in according to the list but sometimes I need to modify the text in the text field, I can't;for example the ZCQJ006 can be 70 and can be 80 and sometimes even 85, please helpdrop-down = NGAPCCAM text field1 = paiement text field2 = Sommejavascript = var f = this.getField("NGAPCCAM");var g = this.getField("paiement");if ((f.valueAsString=="ZCQJ006") && (g.valueAsString == "CMU")) {this.getField("Somme").value = "70";
Hi fellow Adobians 🙂 I am wondering if somone could make a Acrobat-script for me?I am not familiar with coding or making scripts and has come to realize that I can not make this myself. I need a script that splits a 12 page PDF into 2 separate files. Document 1 - Page 1-2-11-12 in one file (original filename+ "-omslag")Document 2 - Page 3-4-5-6-7-8-9-10 in one file (original filename+ "-innmat") I would like to have this accessible from either a hotfolder on my desktop or a menubutton in Acrobat. Is this possible and are there anyone who could assist in making such a solution? I am asking because I have a customer which we are printing folders for, and this is on a weekly basis. The reason why I need it, has to do with finishing and workflow on digital printing. Best regardsTommy
Hallo zusammen,ich habe eine PDF, in der der Erfüllunsgrad einer Einarbeitung dokumentiert werden soll:Erfüllungsgrad PDF Der Erfüllunsgrad soll jeweils über 5 Comboboxen dargestellt werden.Im Moment habe ich es so gelöst, dass in jeder Comboboxreihen eine Aktion ausgeführt wird, welche beim Setzen eines Hakens die CB farbig machen soll. Dies geschieht aber nur beim Drucken. Die CB wird in der Ansich nie farbig. Was ich also möchte - und ich hoffe da kann mir jemand helfen -ist, dass in einer Reihe von CB immer nur ein Haken gesetzt sein kann und sich die Farbe aller CB links davon einschließlich des der CB mit Haken in der Farbe der Spaltenüberschrift gemacht werden sollen.Sprich wenn in Zeile 1 CB 2 aktiviert ist sollen CB 1 und 2 rot sein. 3, 4 und 5 sollen farblos sein.Wenn jetzt in Zeile 1 CB 5 aktiviert wird, soll CB2 automatisch abgewählt werden und alle CBs in dieser Zeile sollen grün sein. Aktualisert soll die Farbe der CB am Besten immer werden, wen
I am looking for some help. I am very new with Adobe and I am working on a form that has radio buttons and I want to add pages into the form when a button is selected. I have made my 2 additional pages templates with the names: Additonal 1 and Additional 2. I am struggling with the script to make this happen. Any help would be awesome!
I'm having an issue with a form I've been developing where spawning a page turns half of the text fields and one combobox into this generic field without a name (instead of saying text or combo in properties, it just says field).I have a four page form with pg. 0 as the cover page and selections made on that will spawn one of the other three pages. The other three pages spawn great and page 0 is the least complex of all the pages.There's also a button on the three spawned pages that will delete the cover page then show a button that will spawn the template back to page 0 if required. I figured out through trial and error that I needed to spawn the cover page and hide the original, otherwise page 0 would be deleted.The code is really simple to create the field and no different than the way the others are created, spawning to 1 and using bRename and bOverlay as false. this.getTemplate("Cover").spawn(1, false, false);
Have two date fileds - StartDate and EndDate How to make check and make sure that EndDate is later than StartDate
We can see the file running from the below path and is being detected by Threat detection part of Cyberark EPM.Path - C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\plug_ins\pi_brokers\32BitMAPIBroker.exeLet me know whether to block it or not.
In a PDF, I want to make a filed to only be allowing digit only although the filed is a text filed
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.