Unlock the power of Acrobat SDK through our community.
Als letztes aktiv
I'm working with Microsoft Office VBA. In the Acrobat WebCapture 1.0 Type Library (AcrobatWeb2PDF ) there's a function CWeb2PDF with a NewDocumentWithBase method. It takes the arguments pClient, pDocument and basePath. I can't find any documentation on how to use this function. Especially, what are kinds of objects should I be passing as the first two arguments?1. I've got an Internet Explorer object open that I'm working with -- can that be passed to this function?2. is the second argument "pDocument" a PDDoc object?Thanks for any help on this. Or pointing me to the documentation for the VBA interface.
I have a table with 10 rows in an acrobat doc. In one of the columns I need the user to rate the question 1-5. I figured it was easiest to do this with a text field where the user can write 1, 2, 3, 4 or 5. I need to represent these ratings as percentages where: 1=50% 2=75% 3=90% 4=95% 5=100%. At the bottom of the table is a total box where I need the average percentage of the 10 boxes.... any ideas? Im looking to replicate the excel spreadsheet below
I have a pdf fillable document, created in Adobe Acrobat xi Pro, it has 1 required field (1st Purcahser) and 2 submit buttons. I need the first Button to not validate the field and allow submission. The second button should validate the field before it will submit. I have yet to find the correct javascript to do this.
I have a document which is placed on the company intranet (it needs to be password protected), if a copy is downloaded, the next time it is opened a watermark will show on each page.The script is placed as an action on the page open event.this.addWatermarkFromText("Uncontrolled document", 0, font.Helv, 24, color.red);This script works however once the pdf is password protected it will no longer run the script.NotAllowedError: Security settings prevent access to this property or method.Doc.addWatermarkFromText:1:Page undefined:OpenCan anyone please advise how an embedded javascript can run after the document is password protected?Thanks
Hi All,Firstly I would like to say thank you for the people who gave me lots of help and advice regarding my previous questions in the forum. And I really learned a lot.But there is still a question that I do not know how to figure it out. According to Batch-Import List Data into PDF Form - KHKonsulting LLC I try to modify the code but it always shows "User Cancelled File Select" error when I use custom command in Acrobat DC. I only want to learn to add one field which is "Title" field to the fillable PDF form. But it doesn't work. My data list is like(tab delimited text file): Only one rowMy form is like: (fillable form)My code is :var dataFile = "/z/JavaScriptProject/form1.txt"; var tmpDoc = app.newDoc();tmpDoc.addField("Title", "text", 0, [0, 0, 100, 100]);var err = 0;var idx = 0;while (err == 0) { err = tmpDoc.importTextData(dataFile, idx); if (err == -1) app.alert("Error: Cannot Open File"); else if (err == -2) app.alert("Error: Can
I would like to have a javascript keep a rolling counter for the amount of times a file gets printed. This would not reset on open of the file, but just continue from the last number of the print.Is there any way of doing this with JS?Any help would be appreciated.thanks
I created a time sheet form in Excel and made it into a fillable PDF. I want to calculate the difference between the end time and the start time in the simplified field notation format. I went into Edit and right clicked or double clicked on the answer box and went to the Calculate tab and Simplified field notation. I put in the start and end time (we use military time and I wonder if this is the issue). If I use the Number format is calculates fine for most anything I put in for the start or end, but if I put a start time of 8:30 and an end time of 12:15, it gives me 3.85 instead of 3.75. What am I doing wrong?
HelloI'm new to scripting and new in ADOBE DC,so far I have understood how to run a code through the console.I have found thanks to By Karl Heinz Kremer this code :for (var p=this.numPages-1; p>=0; p--) { for (var n=0; n<this.getPageNumWords(p); n++) { var theCurrentWord = this.getPageNthWord(p, n); if (theCurrentWord == "9 - 10 ANS") { this.deletePages(p); break; } else if (theCurrentWord == "MOIS") { this.deletePages(p); break; } }}it works very well, but it takes a very long time to
ASTextSetEncoded(astxt, "new.file.name", (ASHostEncoding)PDGetHostEncoding());astxt becomes "new.file" instead of "new.file.name", i.e. "name" is lost.How do I resolve this?
I have the following Java script for a text element within my document. The problem is that the sequential numbering does not work unless the document itself is saved. The form is intended to serve as a master that would be "save as" after it is completed. To prevent user error, I'd like the document to immediately "save" itself after it is opened. Of course there is still user error later if the user clicks save instead of save as - that's my next problem.Ideally the behavior would be:user opens masterdocument immediately saves itself (Java-driven)user completes documentuser SAVES AS a new documentmaster document is closed**next time it is opened, the text tracking number updates sequentially//-------------------------------------------------------------//-----------------Do not edit the XML tags--------------------//-------------------------------------------------------------//<Document-Level>//<ACRO_source>Document Number</ACRO_source>//<ACRO_
I need help. I have scoured over countless posts/articles/how-to's, and I still can't figure this out!I made a 6 page form with almost every field required. It doesn't matter if they don't go in order, they just have to enter information before saving.Fields are: text fields and radio buttons; no check boxes.I found out that there is nothing preventing a user from saving an incomplete form. Fine.I found out how to make a pop-up alert when they click on a field and then click off, leaving it blank. Awesome, but ONLY if they first clicked on that field. If they completely skip over it, not so awesome.How do I make a message pop up when they save to ALERT them that they missed something on the WHOLE form?In all of my research, I found stuff that points to preSave validations, but no one has ever explained the steps on going about executing this. I have even found a post talking about executing an Action Script with a button, but it doesn't seem to work.This f
So, I'm trying to create a self-calculating form in adobe acrobat to make my life and the lives of others a bit easier (also I've seen other people make them and it looks like a pretty neat skill to have). My problem is I have no idea how to javascript or program, and I need to use javascript to make this form do what I want.So instead, I've started to teach myself the basics of javascript to create calculating forms, but I've gotten stuck on a couple of fields that I'm not sure how to solve. So here's my code so far:var mf = this.getField("field1") ;if (mf.value > 0 && mf.value < 😎 {event.target.value = [+0] ;} else {if (mf.value >= 8 && mf.value ) {event.target.value = [+1] ; } else {event.target.value = [+0] ;}}What I want this calculating form to do is: When a user inputs a number of 8 or more in field1, then field2 gets a +1. Just once. If field1 goes below 8, the +1 in field2 goes away. So tried to implement that. One time, field2 started adding
i am trying to enter this Excel formula into a Java Script however I have no clue how to use Java. can anyone help me translate this please? =IF(Text6.0=0,"X",IF(Text6.0<=13,"Low Risk",IF(Text6.0<=19,"Medium Risk",IF(Text6.0>=20,"High Risk","X")))) I have changed the Excel cell numbers to the correct names of the Acrobat form fields.The Acrobat i am using is Pro DC. Thanks!
I have a radio button ( "Required" or "N/A" ), I would like to display an alert if N/A is selected. I have attached the following script to the N/A button, but nothing happens.if(event.value==="N/A"){ app.alert("Required if ...",1,0,"Required?");}
In Acrobat Pro DC, I am working on a form containing 14 dropdowns, each having the same default "Click to rate". I am JavaScript illiterate, but I knew I wanted a submit button to do a couple of things, so I searched for code and played with it. My button to submit the form, on mouse up, checks the dropdowns to make sure something other than the default is selected. While I just realized how ridiculously cumbersome the code is, it actually works. Now I also want the form to be emailed via the same button, but I can't figure out how to keep it from emailing when some dropdowns still have the default choice -- the user can now just click okay on the error message, opening the email interface.Y'all, this code is long and laughable. Don't judge; I said I'm JavaScript illiterate. Thanks for reading and, in advance, for any help I can get.var bSubmit = true; // logical variable for submission test// test drop down Dropdown1this.getField("Dropdown1").required = false; // clear required
Hi Experts..I write code in checkbox so when clicked it will show (today date) inside date field, the problem is that i want when the user uncheck the Checked box it will restore again the old date, i try to store the date many ways but the script is ignoring any variable to store the old date,, so it ends me to call the old date from another field,, but are there any way straight forward in the same code , here is my code inside ( MouseUp Event of the Checkbox) :// Write Today Date in Georgian//WriteTodayDate if Checked// box is checkedif (event.target.value != "Off") {// get todays date objectvar oNow = new Date();var sNow = util.printd("yyyy/mm/dd", oNow);// set date nowthis.getField("todaysDate").value = sNow;} else {// box is unchecked//Set the Old datevar OrgDate = this.getField("PrevDate").value;this.getField("todaysDate").value = OrgDate;}and Thanks in Advance for any help
Hello,I know how to combine pdf files into one etc, but I looking for a JavaScript code/command I do it within a JavaScript command code or a plug-in using Action Wizard.Regards,Jeff P
HiIt was interesting to see Adobe Pro DC providing complex feature of comparing 2 pdf documents. I would be more interested in knowing if I can access the same feature using command-line/batch mode, so I can automate the comparison.Thanks.
I need to enter the calculations on a .pdf form and I am having trouble getting the percentages to work.I have a Property Value (field 4.3) then a Borrowers Equity (field 4.6) and then a Percentage of Equity (field 4.7)What Java Script would I use to get the percentage to come out correctly (example 20.0%)
If there is some fields like the following, is there anyway (maybe using API or SDK) to get the position of the fields (for example left 47.52 pt, ...) and the name of the field (in this case Text1, Text2 and Text5)? I would like to export these information into a text document or XML.
Hi Experts..its my first time to deal with the Global Object inside the Acro Form, because its also the first time to work with 2 pages in form not only 1so i noticed that calculations in the page 2 not working..the code is here , is just Text Field Formatted as Percentage Number that will show the Amount of Check Boxes (if Checked by the user) as Percentage..I write the following code in (Custom Calculation Script) inside 16 (Text Field with the Same Kind) in every pages of the two, because every one of percentage is responsible for monitoring 20 Check box Group in one row repeated in 16 row (as Shown in the Loop), this code was working fine until i add the second page, its still working in page 1 of the form but it stopped working in page 2CallPeriod();// Initialize counter variablevar sum = 0; // Loop through the fieldsfor (var i = 1; i<=20;i++) {// Add one if check box is not Off if (getField("A" + i).value !== "Off") {sum += 1;}} // Set this field'
Hi all,I've asked a similar question before: How to use external data to fill in an existing PDF form in JavaScript? Also, I learned these two links as references: Batch-Import Excel Data into PDF Forms - KHKonsulting LLC Batch-Import List Data into PDF Form - KHKonsulting LLC But I still have some questions because I don't have JavaScript experience before, still a beginner now. Any help and suggestions are appreciated. What I would like to do is put the "username" and "age" to a fillable pdf form. I've already written some JS script.==========================================================var userInfo = { // data source userOne: { name : "Max M", age : "100"}, user
How can i calculate age in a form based on the birth date that the user will input?
Hey Everyone, Hoping someone can help me with this as I'm new Acrobat forms. I'm trying to populate dropdown list values in an adobe acrobat form via Javascript. Basically looking to populate it with the Current Year, and two years after it. So option values of 2018, 2019, 2020. I'm not sure how to achieve this where the dropdown is populated when the PDF is opened. Would this be done at the document level javascript ? And if so how is this initiated ? This is what I have so far (Not sure if it's correct): var d = new Date();var y = d.getFullYear();Dropdownlist1.setItems([y, y + 1, y + 2]);Any help would be appreciated, thanks.
I am trying to create a java script to auto populate a shipping rate when using Forms. I am very new to js, and just trying to improve some forms for work and make them fill-able on our website. If its possible, and someone out in Adobeland could help write I would greatly appreciate it. What I would like is for the "Merch total" field to auto-fill my "Shipping and handling" field. Our shipping rates are as follow:$0.00 to $39.99$10$40.00 to $74.99$12$75.00 to $99.99$15$100.00 to $199.99$17$200 and up$20Thanks in advance!-B
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
Sie haben bereits einen Account? Anmelden
Noch kein Konto? Konto erstellen
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.