Unlock the power of Acrobat SDK through our community.
Nyligen aktiv
My goal is to create an automated Save As function (utilizing a button or something on the document) that will save the document to the same location as the original file, as well as rename the file by reading certain fields on the document. An example of what I would want the save file to look like would be:LastName.FirstName.IDnumber.ReasonForVisitThe last name, first name, and ID number are text fields that would have those obvious details entered and the reason for visit would be one (or multiple) of various check boxes that would have an export value. I wanted to know if it is possible to do something like this, as well as putting a "." between each of the details to make it easier for sorting/searching purposes. I know this would include a folder level script, I also wanted to know if there is a file level script needed or if the call script would only be attached to the button created. I would also like it to prompt the user if there is already a file with the same name (to over
Hello all I am need to using Acrobat for calculations and I am look for some help with an if statement this is what I am trying to do I have an input box and I need to take what ever is put into that box and calculate and show that in the secound box, but I need it to not show anything in the second box if nothing is put in the first box. I hope this makes sense, this is the jave script I have and the calculation works but it will still do a calculation in no number is in the first boxthese are the 2 boxes in the calculation I have this scriptevent.value=((-(+this.getField("Input").value/3-6000)*(1.052-0.7778)/100))Any help would be great and thanks in advance
Hello,I'm trying to create a script which will calculate the proportional percentage of a numerical entry sectioned by date. For example:Date%Adj. %Total2/1/195%100%52/2/195%100%5Date%Adj. %Total2/15/19511.11%451022.22%3066.66%2/18/19675%8225%So, the "Adj. %" values associated with each "parent" "Date" value should equal to 100% when added together. My issue is that my script doesn't seem to iterate properly and I end up with strange "Adj. %" values that do not reflect the respective "Date" and "%" field value entries. I included a link to a pdf, which includes the script I'm having issues with: https://docdro.id/TDcy6RX I'm going crazy over this, any help will be highly appreciated!
Hello all,I'm an intermediate macro-writer but most of my experience has been in vB in Excel, so JS is a bit unfamiliar to me. Apologies if I'm missing something obvious, and any help is appreciated. The task I'm wanting to complete is:Identify Scope (Multiple 1-page, identically arranged PDFs)Open First FilePrompt User to draw a Redact Area around some coordinatesApply RedactionsLoop through the remaining documents, applying redaction to the same area.So far I've been trying to stitch together a few tutorials/pieces of sample code but I'm getting stuck a lot earlier in the process than I expected, hence my reaching out. The code I'm working with is from the below:https://acrobatusers.com/tutorials/auto_redaction_with_javascript https://acrobatusers.com/tutorials/apply_security_with_js https://acrobatusers.com/tutorials/folder_level_scripts But I can't even get the first pieces of sample code to run exactly as-is on the sample file provided. For the below:// Part 1: Quads for the diffe
I have an extensive script, DoSummary(), which when called from a Mouse Down event works fine - all fields are updated as expected. However, when the function is called from the custom validation script from any of my form's text fields and drop-downs, the fields to be updated by DoSummary() are not changed - instead, they change AFTER another change is made to one of the fields. I have checked and enabled all of the 'Commit Selected Value Immediately' for the drop-downs, but no help. Basically, the Summary Page of this document is constructed by DoSummary() using a loop (for six identical records). All non-empty or non-blank fields are counted, with some being summed and averaged. Again, if DoSummary() is called from a mouse up event of a button, all is fine. But, when calling the same function from the validate's custom script, the behavior delayed. I hope this is explicit and detailed enough. If there is other information needed, please post.Thank you,
Hello everyone, I have about 400 page pdfs. I need to delete (20, 21, 100, 150, 300.... pages) some random pages. Page numbers to be deleted are listed in excel. Can I delete those pages with one shot using any script. Or can I delete those pages using bookmark which is one character lengthier than the others. i.e the page need to be deleted having bookmark one additional character comparing to pages which need to retain. Using the bkm length or using the list in excel... any way it is good to me.
I want to pull a value from a field and perform calculations on it but if the field contains any non-numeric characters I want it to do nothing.
I read the SDK Help where I found that I can view and modify pdf files in a custom pdf viewer which I need to create on my website using javaScript, but I really can't find any complete example to show me how?what I need is to make custom viewermay be I will need to merge of split some pdf filesI found SDK articles like this one Acrobat DC SDK Documentation ..I need to really implement my own pdf viewer in my website.
I have a VBScript file that iterates through a designated folder. My end goal is to check for files over 25MB and use Acrobat 9's "Optimize scanned file" feature to make them smaller.Unfortunately, I do not know the command or function within Acrobat's API in order to make this happen. What commands can I use to automate the process of optimizing scanned files?This is a VBScript file running on a local computer with Acrobat 9 installed. I have tried looking through Acrobat 9's API documentation but cannot seem to find an answer.My code so far:Const PDF_FOLDER = "Z:\ARM\temp\" Set gAcro = CreateObject("AcroExch.App") Set newPD = CreateObject("AcroExch.PDDoc") Set newAV = CreateObject("AcroExch.AVDoc") Set fso = CreateObject("Scripting.FileSystemObject") Set oFolder = fso.GetFolder(PDF_FOLDER).Files For Each fileObj In oFolder If fileObj.size/1000000 > 25 Then newAV.Open PDF_FOLDER &
Hello,I am facing strange problem across all PDF Forms which i make via javascript.The number fields instead of getting sum it gets concanated.Please watch the below video to get clear picture of what is the problem.Dropbox - concatenation problem.avi basically i had to get the average of the number of fields filled by user......The following is the script i used:var counter = 0;for (i=11; i<=20; i++) { if (/^\s*$/.test(this.getField(i).valueAsString)==true) counter++;} if (counter>0) { var total = counter;} else total = "";var v2 = 10 - total; // to get the number of filled filedsvar v1 = this.getField("11").value + this.getField("12").value + this.getField("13").value + this.getField("14").value + this.getField("15").value + this.getField("16").value + this.getField("17").value + this.getField("18").value + this.getField("19").value + this.getField("20").value; // sum of all the fieldsevent.value = v2 !==
When using text to speech on the Mac with Adobe Acrobat Pro DC or Adobe Acrobat Reader, I run it through OCR first so it is no longer an image than highlighted the text and use the text to speech key command shortly following that the PDF says "processing of this document has been canceled". This there anything I can do to fix this? I'm using a PDF Journal Articles found online for a college paper and I am blind/visually impaired so figuring out how to fix this is highly important. I am considering purchasing Adobe Acrobat Pro DC for my MacBook Pro but currently use it at school. I figured I would get used to it before I make the big purchase. Any suggestions would be highly appreciated.Thank you for your time.
Hi,I'm new to javascript so please excuse me. I am trying to clear image fields on a document. Currently, the user can include an image but if they want to change it they can only replace it, they can't delete it.I have tried three scripts below -- in both the image properties box and in a separate button --- and nothing words. I can get the scripts to clear text fields but not the image fields.1. if (xfa.event.shift){this.rawValue = null;}2,if {this.resetForm(["imageField1"]);}3.ImageField.rawValue = null;Can anyone tell me what I'm doing wrong?Thanks for any help.Joanne
Hello all, it's been awhile. I use to have this add on tool that allowed me to select the fields and annotations I wanted to flatten and would leave the rest of the fields alone and fillable. I don't have that Mac any longer but do have Acrobat X Pro on this used Mac I just picked up. I don't remember where I got it from, but I do remember it didn't cost anything. Would anyone know what I'm referring to? And, where I can download it again? I tried Thom's @ pdfscripting.com already but that's not it. This one has quite a few option selections in the interface. What I remember it came with these check boxes and asked you which fields and/or annotations to flatten. If you know would you kindly let me know. Thanks.
Hi,In version 11, Adobe Acrobat displays all of the actions for some reason under the "Process and label files." Is there a way to hide these so the user does not accidentally click on an action out of sequence instead of hitting start? This causes confusion for users who think they can skip to step they want in the sequence without realizing every step is important.
Can’t get ‘thermometer’ to display when using adobe reader DC. It does display when using Adobe professional version.Below is sample code I’m using. var t = app.thermometer; t.duration = doc.numPages; t.begin(); for (p=0; p<doc.numPages; p++) { t.text = "Searching … page " + p + "/" + doc.numPages; } &
Hi, I have a javascript already that is populating multiple check boxes and text boxes to a single summary text box and it is working great so far! The only issue I have is that when it all populates to the to the single summary text box it is one thing right after another separated only by commas. It's hard to delineate where the related information starts and begins. Is there any way to put a like a "spacer line" to separate out the info to make it easier to read? I have highlighted the related information that needs to be grouped together. I need a space to appear between each other these Colors when it populated to the summary text box. Any help is greatly appreciated...Thank you in advance. Here is the Java script as it is now: var values = []; for (var i=293; i<=306; i++) { var fname = "CheckBox "+i; var f = this.getField(fname); if (f==null) {  
I have fields on a PDF form for number of hours. I want to allow for 2 decimal places to allow for quarter hours (15 min, 45 min). This is an example of what is currently being displayed:4.003.256.50Is there a validation script that would hide the trailing zeros? I want the numbers above to be displayed as:43.256.5 I've also been looking for a script that would round to the nearest quarter hour (.25, .5, .75), but I haven't had any luck finding this on forums. Is this even possible? It seemed too complicated so I abandoned the idea. I'm a novice when it comes to custom scripts and would appreciate any help from this knowledgeable community.
Hello,I have a form that contains credit card input boxes. I'm looking for a code that will select the appropriate form of payment based on the first number of the CC number input in the field.I found this:this.getField("Check Box").checkThisBox(0, event.value>"0");Which worked great! Until I put in the other parameters...then it started selecting multiple check boxes...Please help!
If there's a particular sequence of operations in Acrobat DC that I perform using menu options, is there a straightforward way to do the same thing in JavaScript?In my case, I do this sequence a lot: "Prepare Form > More > Export Data > Save" That's only four simple steps - is there way to do it in JS? Or is there some other route? Thanks. -Steve
Please do java for iPads .
Good morning.I am creating a program that automatically signs a PDF, but at the moment of signing I sign with a default image:I would like to know some way to upload the image that I want.
I'm still working on the same doc a few years later. What I would like to do now is to make a job sketch of a fence layout with the drawing tools in Acrobat. Most of the doc, up to this point, has been created around using the following script. Here's just a few lines, but you guy will know what I'm doing. So, take a look at the following: try {otherDoc.getField("DrAA1").value = myDoc.getField("DrAA1").value } catch(e) {}Is it possible or would anyone know of a way of making the drawing in one myDoc the click "Generate" button and the fields and the drawing would fill the otherDoc. Any solutions or suggestions would be appreciated.
I have been trying to delete a particular page using the following script provided by Acrobat JS aficionado Karl Heinz Kremer. This code is in the mouse up event of a button. The text "HW2019-02" is searchable on the page (not an image and not a field value).Unfortunately, I just cannot get it to work. Does anyone have a fix for this?for (var p=this.numPages-1; p>=0; p--) { for (var n=0; n<this.getPageNumWords(p); n++) { if (this.getPageNthWord(p, n) == "HW2019-02") { this.deletePages(p); break; } }}Thank you in advance
Dear Javascript experts,I'm trying to do this but it is very wrong.If 1 field gets lower in textSize the other field has to adjust the same textSize automatically.var pricefield = this.getField("01_pricefield.pricefield").textSize;var pricefieldxtr = this.getField("01_pricefield.extra.pricefield").textSize;if (pricefield < pricefieldxtr) {pricefieldxtr = pricefield;} else {}Already thanks for the help!Greetings
I am converting a HTML file into PDF using evoPDF library in a c# application. This PDF form has multiple textboxes and my requirement is to track keypress event or blur event for these textboxes. I am not able to find syntax on how to write these event handling in Adobe JavaScript. Can someone guide me with these. Your help will be highly 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.