Unlock the power of Acrobat SDK through our community.
Recently active
Hope someone can help me with this. I think I understand how to do the individual action but can't seem to put them all togther to work.I have 2 values ( A and B) that I need to multiply. This is easily done. I then need to validate that the answer does not exceed a max number (example 500). if it is over the max dose, the answer will always be 500. if the value is below 500, the number needs to be rounded to the nearest 50.
Hi, I have been struggeling with a way to get a form button to create two printouts. One as the form looks orginally and one with a COPY stamp/watermark on it. I have not gotten any script to work. Is this possible and if it is how do i do it? Hope you guys can point me in the right direction
This has been infuriating me for a few hours, and it seems like the kind of problem fresh eyes can help with. The issue is explaining it all... I've mentioned my project numerous times, and the same 3 or 4 community members continue to rally to my cause, so I'll get right to it. The following script is intended to run from a button which is next to a photo. It should move said photo and all photos past it down a slot, leaving the slot it was in "blank", ready for a different photo.function insTop(){ //If the last photo is already filled in, this spawns a new page first if(getFieldOn("botPh", this.numPages - 1).buttonGetIcon() != this.getField("blnk").buttonGetIcon()) spawnNewPage(); event.target.setFocus(); //these variables are arrays for the affected photos/captions //they are filled in the order they appear in the document var topPhs = []; var topCaps = []; var botPhs = []; var botCaps = []; for(var p = event.target.page; p < this.numPages; p++){//loops through each page
Hey everyone, I have a list x = ['Foo_1','Bar_2'] Foo is the name of a field in the same form for which I need the value - I then want to check if that value is equal or lower than 1 and then store that result (as ill need to do the same for multiple items in the list) Using the fact that the fieldname will always be three characters long I've written x.substr(0,3) which I then use to get the field valueif (this.getField(x[0].substr(0,3)).value <= x[0].substr(-1)){ //store the fact that the Foo field is lower or equal to one (in this example) } So my question is can I use the string resulting from x[0].substr(0,3) in the name for a variable? when I try:var 'state_'+x[0].substr(0,3) = 'Yep'I get the error 'missing variable name' Any suggestions how I can solve this? Thank you in advance for any trouble to be taken
Hi guys, Hoping you can help. For a while now i have been using some javascript to replicate stamps across all pages this.syncAnnotScan(); var annt = this.getAnnots(this.pageNum)[0]; var props = annt.getProps(); for(var i=0;i < this.numPages;i++){ props.page = i; if(i != this.pageNum) this.addAnnot(props); }However now i have the issue of having 2 stamps i need to replicate and this code will only replicate the first stamp i place does anyone know what i need to insert to get this to replicate both stamp?
How do I use the below script on more than 1 field as current it gives an error on other fields if (event.value != "") {event.value = util.printf("%0.2f",event.value)+"%";}
Hello all,Is it possible to add text and signature to a different PDFs? These PDFs have the fields to be filled in the last page, at the same position. Please help me with this. Thanks a lot
I have a contract form that I want a client to fill in thier name in a field and that name to be populated into other fields later in the PDF. However, the fields later on can not be the same as the original field because those fields will be hidden until a checkbox is checked. How can I do this?
We're using PDDocCopyToFile(pDoc,&params) in our custom C++ plug-in and it works fine. But if the user opens non protected document, then in Adobe Acrobat settings sets password to the document and then presses our "save command button", it fails in our call to PDDocCopyToFile API method. Alternatively, we tried params.saveChanges = false and just PDDocSave, but with these either changes were gone or password protection was lost. Should we specify any extra parameters to use PDDocCopyToFile with password protected files? Or how we should proceed further, if the user sets password for the current opened document, to save it afterwords prorgamatically and do not lose the changes? We couldn't find anything related in API documentation. Any suggestions are higly appricieated.
The project I'm working on is a photo report. The technician filling it out looks at a photo log and adds 6 or more photos and captions to the PDF before printing it. I have each photo button set up like so:event.target.buttonImportIcon();I know that this method has security restrictions (a red 'S' in its quick bar in the Acrobat API Reference), although I don't completely understand that. When am I not able/unable to call such methods? I ran into this first when trying to spawn a blank page from a button (I ended up discovering and using templates this way). However, I digress. My real question is can I set up a document that can import multiple icons in one shot? The file will be stored on a remote server (as well as the photo files its importing), and there is noticable lag while importing. I would like to be able to handle it one of the following ways:Place the photo report template in the same folder as all the photos to be imported; all photos in the folder with it are autom
I have written a Javascript process that searches a template and grabs the text in the title block (by cursor coordinates). The script then uses the text it finds, does a bit of judo and then creates a standardized text string that is then built into a bookmark using the following bit of code:.....//Extra function to deal with hyphensvar theTitle = prepareTitle(list)var root = this.bookmarkRoot;try { // If <a> is returning nothing interesting, then call it an odd template // Highlight it and make sure it gets coded properly if (typeof a=='undefined'){ root.createChild('***NOT A STANDARD TEMPLATE***', "this.pageNum=" + p, p); } else{ root.createChild(theTitle, "this.pageNum=" + p, p); } }catch (e) { app.alert("Processing er
Is there a way to trigger a script from the event of a page being deleted from the page thumbnails tab? Related, is it possible to prevent page deleting in this manner?
I have a document level script for updating my page numbers:function updatePg(){ var f; for(var p = 0; p < this.numPages; p++){ f = getFieldOn("pgN", p); f.value = "Page " + (p + 1) + " of "; this.getField("pgT").value = this.numPages; } }I then have it called from a button that spawns pages. It was working, but later without changing that code, I started getting TypeError: f is undefined 6:Document-Level:updatePg
Hi,I need to replace one text with another. Using the PDWordFinderAcquireWordList method, I get the text of each page of the document. Then I find the text I need in the text of the page and determine which characters in which words of the document I need to replace.To replace characters in a document, you need to get the context of the desired page. I do this using the PDEContent operator pdeContent = PDPageAcquirePDEContent (pdPage, gExtensionID);As I understand it, to replace the text you need to remove the elements of the pdeContent object and insert your elements. I need to find out which elements contain the characters that I need to replace, delete these elements and insert a new element. I do not know how to find these elements.Perhaps there is another way to replace one text with another.I would be grateful for any help.
I have created a PDF with several layers. Each one of the layers has different line items with checkboxes as people review the line items and check off that they're done. Depending on what questions they ask at the beginning of the document they would get a specific layer. My issue is I will add check boxes to each one of the layers but they don't show up as actual check boxes when I add The layers to my document. How do I keep the checkboxes usable for each one of the individual layers. I would like to have them go through the document and depending on answers activate different layers. Thanks.
We have created several image insertion fields in the form.In this field can insert own "Icon".And it can set the "Label Name".These can be displayed in the image insertion field. I want to manipulate this "Icon Label Name" with Javascript. Please be attention. It's not "Field Name".This means that this field has a "Field Name", "Inserted Icon", and "Inserted Icon's Label Name".What I want to manipulate is "Inserted Icon's Label Name". I don't know how to do this.Nowhere can I find a way. "Field name" can be obtained in the following ways.---var Peace01 = this.getField("Peace_01");var Peace01label = Peace01.name;event.value = Peace01label;--- I tried the following, thinking that maybe I should rewrite the second line, but all returned an error. var Peace01label = Peace01.label;var Peace01label = Peace01.labelName;var Peace01label = Peace01.note;var Peace01label = Peace01.tag;var Peace01label = Peace01.id;var Peace01label = Peace01.caption; so on... I
Hello from Hello from St.Petersburg.I need to extract the text from the page of the PDF document in the sequence in which it is displayed on the screen. I sequentially read the words from the page. After that I want to sort the received characters in the desired sequence. For this I use PDWordGetCharQuad method. This method should return character's quad specified in user-space coordinates. It turned out that for all characters of one word, the PDWordGetCharQuad method returns quad with the same coordinate values. Why is that?I would be grateful for your help.
Dear,What is the JavaScript code to silently print first and fourth page of a PDF document?My PDF file has 7 pages but I want to create Print Button for printing only first and fourth pages.Kind regards
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
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.