Questions
Recently active
Good Forum Folk, I wish to create a new .PDF composed of all the first pages of a large number of other .PDF's. My preferred approach would be to create an Action with the "Default option:" of "Add folder..." as its first step. At present I have the following javascript as my second step: this.print(false,0,0,true); [which sends p. 1 of the selected .PDF as a print job to the last-used printer]this.closeDoc(true); [which closes the selected document] I would like to improve the script so that it only prompts to begin the process once (instead of for each .PDF included in the batch). I look forward to your suggestions. QD
Hi all, When it comes to arrays, is there a place I can place and array that is accessible to all fields? Or do I have to write the array in every custom javascript field (which I think would defeat the purpose of the array). Thanks
I feel like I have asked this question before on the old acrobatusers.com forum but can't seem to find it...Anyway, I create a lot of forms and use a lot of JavaScript in them. The form designs/features/functions are updated quite regularly, and I'd like to find out a way to make the process of adding the scripting back in not so tedious.I can't seem to just copy and paste in JavaScript Panel > All JavaScripts or JavaScript Panel > Document Actions > Edit AllIs there a script or another way to do this or am I stuck with recreating document scripts and pasting scripts in each individual interactive object?A little about my workflow:I use InDesign CC to create the form layouts and fields and try to do as much in InDesign as possible. There are a few caveats and possibilities of issues between the two programs, but more often than not, I can manage around those issues.Prior to InDesign having the capabilities of creating forms, I used to design the form in InDesign, export then l
I have a form here that i'm 98% complete but I just can't figure out one slight detail.I'm trying to calculate the total of 2 fields to display in a read only field. That part i got worked out half way. It only works to add, if a value that is lesser than the previously entered value, the one field does not redo the math. it simply leaves the original value and stops working. Here is what i need to do.Form field names:PWR GVWRTRL GVWR (this field has to have a value of 10,001 or more, if it does not, must show a flag to the user, that is must be greater than 10,000)TOTAL GVWR TEXT (Just displays but doesn't print the words TOTAL GVWR. Simple and no need for help on this)TOTAL GVWR (must have a value of 26001 or more when PWR GVWR and TRL GVWR values are entered. If the total of both do not =26001 or more, then flag the user. this i know how to set the value range which is easy.) I need PWR GVWR + TRL GVWR to add and display those 2 added values into TOTAL GVWR text box. That value
Hello again all, I have a field that calculates something. It works. a sample line... if (this.getField("Dropdown2.15.2").value=="ASTRODYNAMICS")event.value = ( this.getField("INTELLECT").value + this.getField("INTELLECT").value ) + this.getField("WILL").value; However, I want to also add exactly 10 more if FieldA="MyTEXTValue". How would I do this? Thanks very much
Is it possible to export an array of files in a directory (PDF files) and export in the same location as the original? or theres any way to acces the export module from command line or any kind of automation? Im trying to automate the following action I have 12 PDF files and then i open every single one and do File->export to->Text->Save Oviously I do this with a ton of files Im in OS Catalina and Acrobat Pro dc 2019.021
I want to embed 3D models into the same field(3D annotation), wich means the model tree can display a series of meshes. I have read the Sdk document four days. But I can't find the API to creat a 3D annotation or embed a series of 3D meshes into PDF.Could anyone know it? I need your help!!Thomas Gan
Hi, i want to add a condition to a text field. so it should only allow to type "Y" , "N" or "U". can u pls help me to manage this work. thanks..
I'm designing a form that records a rate of movement by having start and end times entered (in text fields formatted as hh:MM t) and having beginning and ending distances entered (as numbers with two decimal places). For the sake of the example, let: J = Start distance (feet)K = End distance (feet)M = Start time (clock time)P = End time (clock time)R = Time Interval (in minutes, calculated using Javascript from P & M)L = Rate of distance over time (inches per minute), calculated with simplified field notation 12*(K-J)/R. My problem is that there are times when the person taking the measurements doesn't keep track of the start and end times, uses a stopwatch and therefore only has the time interval R. So I need them to be able to override the calculation in R with manual input. In plain text, I was trying to do this:L = 12(K-J) / (P-M)unless P&M are blank, thenL = 12(K-J) / R Unless there's a way to edit the code in R to allow me to manually override the
Disclaimer: I know nothing in the way of JavaScript and have had to have help figuring out the scripts mentioned below. I'm designing a form that records a rate of movement by having start and end times entered (in text fields formatted as hh:MM t) and having beginning and ending distances entered (as numbers with two decimal places). For the sake of the example, let: J=Start distance (feet)K=End distance (feet)M=Start time (clock time)P=End time (clock time)R=Time Interval (in minutes, calculated using Javascript from P & M)L=Rate of distance over time (inches per minute), calculated with simplified field notation 12*(K-J)/R. My problem is that there are times when the person taking the measurements doesn't keep track of the start and end times, uses a stopwatch and therefore only has the time interval R. So I need them to be able to override the calculation in R with manual input. In plain text, I was trying to do this: L = 12(K-J) / (P-M
Hi everyone. I am having trouble with a dynamic stamp. It has a radio button with 4 choices.When I load the stamp to pdf, only the first choice shows up when it is selected. If I pick the other 3 options, it does not check the boxes. Did anyone have this issue before? Can anyone help me? Thank you, (attached javascript just in case)
I am getting msig_lock is null error when I do the following:var m = this.getField('dt2_member_sig_'+n); var msig_lock = m.getLock(); msig_lock.action = 'Include'; msig_lock.fields = mfields;Anyone have any ideas?
I have a set of over twenty PDFs, all with the same page layout but different content. I need to extract pages 7-8 from each PDF into a separate PDF, but not all in the same file. Thus:PDF1 becomes pages.7-8_PDF1PDF2 becomes pages.7-8_PDF2PDF3 becomes pages.7-8_PDF3 etc.I have tried using JavaScript, but cannot figure it out. Is there a way to accomplish this using JavaScript or Acrobat Actions without going through each file individually?
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.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.