Unlock the power of Acrobat SDK through our community.
Récent
If anyone can offer advice on how to write javascript to return a 0 if a number is less than zero I would greatly appreciate it. I can't seem to figure this out. Here is the scenario: I'm trying to get field L144 to return a positive number or a zero. I'm looking at field L26 to make this determination. I was thinking something along the lines:var theField = event.value ("L26");var theValue = theField.value;if (+theValue > 0) { event.value (L144").value = +theValue;}else { event.value ("L144").value = "0"; }Thank you in advance for any help with this!
I need help with this rounding:var v3 = (this.getField("valor_for").value-10)/2;event.value = Math.floor(v3);I need the value of the operation always be rounded downthanks
Hello. I have set up my form to calculate 1 point for each checkbox selected. I have a text box with a the calculate operation as sum and I picked all the check boxes that need to be counted as a point when selected. Works perfectly when tested in Acrobat but, when I send for signature, it no longer calculates the total in my text box. I have no idea why it stops calculating when it goes through Adobe Sign. Any insight on this?
Would someone be able to help me write a java script for the following:I have a form that has two columns:1st column is Mealswhere they input the $ Amount2nd column is a dropdown menu where they select one of the following.B - has a maximum of $10.00L - has a maximum of $15.00D - has a maximum of $25.00What I would like the script to do…if possible.Under the 1st Column when they fill in the $ amount and then select from the dropdown menu (B, L or D) if the dollar amount exceeds the maximum it will automatically change the amount in the 1st column (Meals $ Amount) to the maximum amount.
Hi,I have a fillable form PDF with buttons at the bottom of certain page that add a duplicate blank form page (giving the user more room to add information). The template page has both text fields and check boxes.When using the button, the additional page is added fine, but the check boxes on the first page are all cleared when they shouldn't be. Any thoughts as to why this might be happening? This is the Javascript code I am using.var expTplt = getTemplate("TemplatePage"); expTplt.spawn({nPage: pageNum + 1, bRename: true, bOverlay: false});Thanks!
I have a drop down field in a PDF form. When a user selects from the drop down, a popup window appears asking additional questions and those answers are inputted into another field. If they click cancel another window pops up asking if they're sure to cancel. If they click the YES button, I want the drop down field to revert back to the default selection.I'm running two functions. One is in the drop down's custom validation window called (fSystemRequest) and the other is called (fExitPortalSelect) that is running inside the (fSystemRequest) function. So if they select YES or try to "X" out of the window, the (fExitPortalSelect) function is ran. Here's the (fExitPortalFunction) code I have:function fExitPortalSelect() { var vQuitPortalSelect = app.alert("Are you sure you want to quit?\n\nYou will not be able to gain access to the network until you answer these questions.\n\nClick 'Yes' to quit or 'No' to continue filling in the infor
HELP!We use a third party tool, Gnostice to take a PDF report created by SQL Report Services and embed the Adobe JavaScript necessary to automatically print the PDF when it is opened in a browser window. This functionality has been working without flaw for many years and hasn't changed. Recently, our customers started reporting that they now sometimes get blank pages or nothing prints at all. The code we use to render the PDF to the browser window is at the bottom of the post.We thought it might have been our upgrade from Adobe Reader 11 to Adobe DC; however, we downgraded and are still having the problem. Has anyone else experienced this issue? If so, what steps might we be able to take to troubleshoot and/or resolve the issue.Any assistance would be appreciated.RENDER C# CODE BELOWpublic void RenderPDF(byte[] buffer, string reportName, string contentType){ var s = new MemoryStream(buffer, true); PDFDocument doc =
How to save a file using the folder name? In the below code i want to replace the "test" with my source PDF folder name. How to do that?newDoc.saveAs("/c/temp/test.xlsx", "com.adobe.acrobat.xlsx");
hello I have a pdf with more than 1000 pages which is a "table of contents" which has links to .pdf files ... on the first page I want to have a page that is a search page (image 1) ... ..ahi be able to search for any of the two options and when the search is done, show the result of all matches and click on any option take me to the page of the "table of contents" "where you are and from there to the .pdf file.Could it be done?
I'm using this script to show/hide a field on a timer, and it works fine, but now I'd like to have the field remain visible if populated (it's a drop down). Here's the script I'm using: if (util.printd("",new Date())=="") { this.getField("Text16").display=display.visible; var timeout = app.setTimeOut("this.getField(\"Text16\").display=display.hidden;", 15000);} else this.getField("Text16").display=display.hidden;I have this attached to a popMenu button. Is it possible to continue to use this script but to add a bit to cancel out the timer when Text16 is populated? It'll then go back to hidden when reset or when blank. Thanks guys
We develop an MFC application that allows users to view PDFs from within it. We do this by creating an MFC modal window in the application, then hosting an instance of one of our objects that subclasses the Microsoft CHtmlView class. To display the PDF, we get path to the file and call the inherited "CHtmlView::Navigate2()" method. There has been no issue with this until recently, where some users are seeing the entire application crash occasionally when trying to view a PDF. NOTE: Adobe Reader XI (11.20.17) is installed.I had the user create a dump file using debug diagnostics, and it looks like there is an exception being thrown in an AcroPDF.dll thread, due to a call in the MakeAccessible.api plugin having a read access violation at a very low memory location:Unhandled exception at 0x5F126E1D (MakeAccessible.api) in dump_file_name_removed.dmp: 0xC0000005: Access violation reading location 0x00000018.If there is a handler for this exception, the program may be safely continued.And th
I have a PDF form in the following situation. The user fills out the form, clicks a button that saves the file as a new file based on his/her lastname-firstname and then reopens the original. During the process the user needs to sign the form. I would like the "Fill & Sign" toolbar to remain visible on top. How can I accomplish that? Can this be done as a setting (in preferences) or in javascript?
I have just installed Acrobat Pro XI on a clean install of Win 10 Pro N but i cannot send emails via outlook 2016 - nothing happens when i click the email icon and select the default mail programme? Any advice please?Thank you,Bogdan
Hello Since we are unable to create GS1 datamatrix in adobe itself I was trying to see if i could bring it from an external location. I know you can open a URL through the following javascript, app.launchURL("https://barcode.tec-it.com/en/DataMatrix?data=(01)03453120000011(17)120508(10)ABCD1234(410)9501101020917",true). This will generate a DataMatrix barcode, and I can always change the data by modifying the command to barcodedata = this.getField("barcode").valueAsString;app.launchURL("https://barcode.tec-it.com/en/DataMatrix?data ="+barcodedata);But now is there a way for it to automatically click the download button on the webpage once the page has been loaded. Also, some online barcode generators do not change the url when data is inputted in the text field.For instance, (https://www.online-qrcode-generator.com/gs1datamatrix) So is it possible to populate those text fields with values from the adobe form and then download the generated barcode.Then i would be able to import the dow
Hi!I need to calculate the sales tax of a field in my PDF form. We need to be able to enter the amount of sales tax in 87 (see below) and then have it automatically calculate in 88 (undefined_9) based off of the amount in 82 (undefined_4). Does anyone have a formula or script that I should use? Thanks!
Currently working on a script for the verify empty fields before printing to give a warning.what i purloined and modified from the forum was // check for empty fieldsvar emptyFields = [];for (var i=0; i<this.numFields; i++) { var f= this.getField(this.getNthFieldName(i)); if (f.type!="button" && f.required ) { if ((f.type=="text" && (f.value=="" || f.value==" ")) || (f.type=="checkbox" && f.value=="Off")) emptyFields.push(f.name);}}if (emptyFields.length>0) { app.alert("Important - You must fill in the following fields or your reimburstment will be delayed:\n" + emptyFields.join("\n"));} else this.print();I need to add for it to check combo boxes for the answer "-" as that the default setting or empty setting. Is that possible?
I have created a spread sheet in acrobat. What I'd like to do is have a rollover (button) at the Item slot and when I move the cursor over it, it would trigger the fill color of the other text fields in that row to show. And, when I move the cursor off the button that particular row would go back to transparent (or white). I'd like to do the same thing with the text. It would just make reading the amounts in the spread sheet easier. Can this be done in a anti-complicated why because I'm learning javascripting. Can someone out there help me get this done? Thanks, guys.
I have a folder level JavaScript that is running when Acrobat starts up. I'm able to add a button to the add-ons toolbar without a custom icon but once I try to specify an icon I get an error that doesn't tell me much.GeneralError: Operation failed.App.addToolButton:1824:Folder-Level:App:config.jsHere is my code:var myIcon;var importIcons = app.trustedFunction(function() { app.beginPriv(); // Create a document var myDoc = app.newDoc(); // import icon (20x20 pixels) from the file specified myDoc.importIcon("myIcon", "/some/path/plus.jpg", 0); // convert the icon to a stream. myIcon = util.iconStreamFromIcon(myDoc.getIcon("myIcon")); // close the doc now that we have grabbed the icon stream myDoc.closeDoc(true); app.endPriv();});impo
Hi All,I am new to PDF script coding, Not sure there is a way to create a script to dynamically update pages from split pdf documents one after the other at the end of the respective document and deploy this as a plug in for acrobat reader for other users .. Please suggest the best way/tool/code to achieve this ?
We are using Interop.Acrobat.dll (Adobe Acrobat 9.0 Type Library) V 1.1.0.0 to access PDF files programmatically. We have a requirement to create a rectangle annotation in PDF (programmatically) similar to the snapshot pasted below. Request you to share the API guidance document (with examples) to integrate the above mentioned requirement with our Microsoft.NET application.
In order to ensure a predefined viewstate reaches the same location for any user, I need to check their display resolution, and modify the scrollposition value based on the resolution it was set with. This is a thing I need to do thousands of times, and obviously we can't use bookmarks.Example: At halfway down an 11" page at 96dpi, pageViewY == ~528;If the user has set their resolution to 110dpi, then it needs to be increased by 114%, or ~606.I have been through the JS API and can find no reference to this value. I had tried using a script that would just set the viewstate to a given value, check the resulting position like so:var zeroState = eval(viewState.toSource());zeroState.pageViewZoom = 1;zeroState.pageViewZoomType = 0;zeroState.pageViewPageNum = 1;zeroState.pageViewY = 3000 ;viewState = eval(zeroState.toSource())var testState = eval(viewState.toSource());var n,diff;n = testState.pageViewPageNum-1;diff = 3000-(testState.pageViewY);if(n > 0){  
The locally installed program ran fine for several months (Windows 7). The problem started today for no apparent reason. Shortly after opening the program, the license activation window pops up. I click on Accept. The file that I am try to work on closes and the cycle repeats, Uninstalling and reinstalling the program had no effect. What do I do to fix this?
Hi,I am writing a vba code, and need use AcroAVdoc.Open,but if no file exit , Acorbat application will show a Dialog ,it say" no file exit " and I need to use manual click the "OK" button to close the Dialog, anyone know how to control let the Dialog not show or auto click the "OK" button ??? I know AcroPDDoc.Open can do the same thing open file , I just want to know how to Control the AcroAVdoc.Open's Exception about open file failed, thanks ~~~~~
string sourceDoc = @"D:\XXXXX.pdf"; AcroPDDoc objPDDoc = new AcroPDDoc(); objPDDoc.Open(sourceDoc); int numberpgaes = objPDDoc.GetNumPages(); //Getting Number here AcroPDDoc objPDDocNew = new AcroPDDoc(); if (objPDDocNew.Create()) { MessageBox.Show("New File Created");
On the form I am creating, I'm trying to create a criteria that if a field has a certain word in it, it changes color. For example: If a classification is Minimum, I want the color of the field box to be blue, if the status is medium, I want the filed box to be brown, Maximum, yellow. How do I create a javascript for this, I'm sure it's simple, but this is the first form I've created with ADOBE. Thank you
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
Vous avez déjà un compte d'utilisateur ? Connexion
Pas encore de compte ? Créer un compte
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.