Unlock the power of Acrobat SDK through our community.
Recently active
Good afternoon Community folks! I think I'm having an issue with understanding the purpose of what util.scand is doing. This is a function that converts a date into a number of milliseconds correct?I'm building a worksheet that has a user put in a date and time (two separate fields) and a number of the calculated fields afterwards is to calculate a certain time afterwards (12 hours, 36 hours, 72 hours). In the past, I was able to use it to pull a date and increment it by 1 but now that this new sheet has a time component I'm finding myself failing to understand what I'm actually doing. var dateStringDay = this.getField("cultureStartHighDate").valueAsString; var dateStringTime = this.getField("cultureStartHighTime").valueAsString; var fullDate = dateStringDay + dateStringTime if (fullDate=="") event.value = ""; else { var date=util.scand("mm/dd/yy HH:MM", fullDate) date.setDate(date.getDate()+<A value here>); event.value=util.printd("mm/dd/yy HH:MM", date); } In the
Hi, I am trying to make a form that will count the number of days between 2 dates and will exclude the public holidays and weekends from the counter.here is my code wich works fine to exclude the weekends but does not cut the public holidays. (i added 03/01/2023 ad my holiday) var start = this.getField("start_date").value;var end = this.getField("end_date").value;var start = util.scand("dd/mm/yyyy H:MM:SS", start + " 0:00:01");var end = util.scand("dd/mm/yyyy H:MM:SS", end + " 23:59:59");var millisecondsPerDay = 86400 * 1000;var holidayArray = [util.scand("dd/mm/yyyy H:MM:SS", "01/01/2023 0:00:01"),util.scand("dd/mm/yyyy H:MM:SS", "03/01/2023 0:00:01"),util.scand("dd/mm/yyyy H:MM:SS", "03/01/2023 23:59:59"),util.scand("dd/mm/yyyy H:MM:SS", "30/12/2029 23:59:59")];event.value = dateDifference(start, end, holidayArray);function dateDifference(start, end, holidayArray) {var startDate = new Date(+start);var endDate = new Date(+end);var diff = endDate - startDate;var days = Math.round(
I have a form that i have tasks that need to be performed by person 1 and reviewed by person 2. Is there a way to have a script that checks that the person signing the reviewed by isnt the same as the person who signed the performed by signature box? I have a script that the reviewed by box does not show up until the performed by box has been signed. But currently i can still sign both. Thanks for your help!
Hi,I add a Submit button on pdf via Adobe Acrobat Pro DC, and succesfully it is working on desktop.But, it is not working on IPAD. When I click button, nothing happens.Can you help us?
Hello, I am looking to reduce the number of decimal places after averaging. The average that I calculated 3+1+1 is 1.666666666666667and it is displaying that answer, but what I would like is that after adobe calculates the average, it will only give me two decimal places. 1.67 This is the code that I am using: var nSum = 0; nCnt = 0;for(var i=1;i<=10;i++){var nVal = this.getField("Proskills" + i).value;if(!/^\s*$/.test(nVal) && !isNaN(nVal)){nCnt++;nSum += nVal;{}event.value = (nCnt > 0)?nSum/nCnt:"N/A"; After I input then event.value =(util.printf("%0.2f",nVal)); I am no longer able to change the average Can you please help me calculate an overall average and them reduce my results to two decimal places
Using Adobe Acorbat Pro DC v2022.001.20142I have a C# application which print and merge pdf using Acrobat Pro.Everything was working fine when I was using Adobe Acrobat XI Pro.With this new version, I get the following error: Creating an instance of the COM component with CLSID {85DE1C45-2C66-101B-B02E-04021C009402} from the IClassFactory failed due to the following error: 80004002 No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). The code who generate the error is: Acrobat.AcroApp gapp = (Acrobat.AcroApp)Activator.CreateInstance(Type.GetTypeFromProgID("AcroExch.App")); I've checked the reference of the solution and it's pointing to C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\Acrobat.tlb Any idea why it generate this error and how can it be fixed? Thanks
On Internet Explorer. When I use the 64-bit version of the Acrobat add-in, it seems to launch the Acrobat.exe process, unlike the 32-bit version.That is fine, but it seems to force Protected Mode to be applied and I cannot access the UserData file from the plugin.Is there a setting that exists to prevent Protected Mode from being applied when Acrobat is launched as an IE add-in?
HelloI have 3 checkboxes for class timings and the person can only choose 1 of the 3.Depending on the checkbox ticked, a text field at the bottom (called (txtOfficeClass) is filled with text.I have searched the forum and placed the following scripts (mouseup) in each check box. It works, but i want to know if i have done in correctly (in case something wrong happens in the future) CheckBox 1(function () { // Get a reference to the text field var f = getField("txtOfficeClass"); if (event.target.value === "Off") { f.value = ""; // Blank the statement field f.readonly = false; // Allow user to enter text } else { f.value = "CLASS 1 (16:30 TO 18:00)"; // Set field text f.readonly = true; // Don't allow user to enter text }})();
I've gone through and highlighted a lot of values in a pdf using the "Find, Highlight, and Extract" tool, and now I'm trying to make a bookmark at each highlighted value. I'm trying to work something out but I keep getting errors. Any help would be greatly appreciated! var valuesToFind = ["1", "2"]; for (var i = 0; i < valuesToFind.length; i++) { this.syncAnnotScan(); var results = this.search(valuesToFind[i], true, true); for (var j = 0; j < results.length; j++) { var result = results[j]; var bookmark = this.addAnnot({ type: "Bookmark", page: result.page, rect: result.rect, name: valuesToFind[i] }); } }
Boa tardeAo abrir o acrobat está a dar o erro 205.Quem é que me pode ajudar.Obrigado
I use the function 'AVDocGetPageText' to get the '±' character in the page, but keep returning '? 'My code is as follows:PDTextSelect textSelect = PDDocCreateTextSelect(pdDoc, 0, &rect);bool ret = AVDocSetSelection(avDoc, ASAtomFromString("Text"), textSelect,true);ASAtom format = ASAtomFromString("Text");string title = "";AVDocGetPageText(m_avDoc, vecPages[i], textSelect, format, TextSelectProc, &title); void TextSelectProc(ASAtom format, void *buf, AVTBufferSize bufLen, void *clientData){ // Look at the memory of *buf and it returns 3f}
Hi All, Have read lots of different posts across the forums to try and help me understand what I need in terms of JS in Acrobat Pro, however I am struggling to find the golden nugget. My issue is two parts: 1. A simple formula/JS to calculate the start time/end time between two fields (HH:MM format) and have that total displayed in the field marked 1 (TOTAL HOURS). 2. Once the timesheet rows total over 37.5 hours in the 'NORMAL HOURS' field, the additional 'hours' spill into the 'OVERTIME HOURS' field. Eg. Total hours on the time sheet form is 45 hours, therefore 37.5 hours would be in the NORMAL HOURS field and 7.5 hours would be in the OVERTIME HOURS field. Screenshot attached. Any help on this would be really appreciated. Thanks!
I have 2 calculated fields [txtMM] and [CalcEATotal] that supply another calculated field [AVGTotal413] with their values from 0 to 10.AVGTotal413 has a Simplified field notation of "txtMM/CalcEATotal*100" but I MUST ensure that it wont calculate if either [txtMM] and [CalcEATotal] are equal to 0. If either is a zero, acrobat will throw an error no matter what page in the document you are on.While my VBA logic could probably solve this issue, my knowledge of Javascript is in it's infancy and I need help here. Thank you in advance
Dear community,although this question was already asked a hundred times, I am stuck with it for two days now and hope somebody of you can help me.I want to add page numbers to an existing PDF (at the bottom on the right side), beginning with number "1" on the second page of the document.Through googling I found out that the "common" way to do this is adding, e.g., text fields and then flattening the document so that the text field becomes integrated in the PDF.Unfortunatelly, I get various problems when I try doing that:These are the relevant parts of my VBA code so far:Dim AcroApp as Acrobat.CAcroAppDim jso as ObjectDim KurzGesamt as Acrobat.CAcroPDDocDim i As Integer, intSeiten As IntegerDim objTextfeld As ObjectstrPfadVerteilungEndlauf = ThisWorkbook.Path & "\Verteilung Endlauf\"strNameKurzGesamt = "00 Kurzübersicht_komplett_" & Format(Date, "YYYY_MM_DD") & "_" & ThisWorkbook.Name & ".pdf"Set AcroApp = CreateObject("AcroExch.App")Set KurzGesamt = CreateObject("Ac
I have an Acrobat plugin for digitally signing PDFs. It's focused on handwritten signatures and, as such, doesn't need to support either Time Stamp or invisible signatures. Is there a way to tell Acrobat not to use my plug in for those functions? Alternatively, can I tell if I'm being called for those functions and return a code for cancel/error (possibly after displaying an error message)?
Hello,My problem is that I don't understand why the fontFamily property of the SPAN object doesn't accept a method that returns an array, but if the fontFamily property is passed an array directly, everything works. To make a long story short. Here are two cases:objA = { text: "Hello, World", alignment: "left", fontFamily: ["Helvetica", "sans-serif"] }; getField("myTextFieldName").richValue = [objA] // WORKS! objA = { text: "Hello, World", alignment: "left", fontFamily: function(){return ["Helvetica", "sans-serif"]} }; getField("myTextFieldName").richValue = [objA] // NOT WORKING!I need to randomly generate a font type in a form based on a button press. Therefore I need to pass the fontFamily property the result of the function, unfortunately the console doesn't tell me anything and I can't find why it doesn't work. The text appears, other properties like alignment and textSize.. too, but fontFamily does not. var objSpan = { text: "Hello, World", alignment: "left", text
Hello,I can't move the x1 coordinate of the text2 field - the field won't change. The console does not display anything. Thanks for the advice// getField("text1").rect = [0, 500, 200, 450] — field already exist // getField("text2").rect = [0, 450, 200, 400] — field already exist // 1. case — DOESN'T WORKS var text1 = getField("text1").rect; getField("text2").rect[0] = text1[0]+100; // END of 1. case // OR //2. case - DOESN'T WORKS getField("text2").rect = [ text1[0]+100, text1[0], text1[0], text1[0] ]; // 2. CASE — DOESN'T WORK // END of 2. case
I put the date in the title in case someone else is searching and gets as frustrated as I am trying to find what is current. In the SDK docs, it says Adobe maintains a registry to assign your prefix, but has no link or other info. I did some searching and found this:https://community.adobe.com/t5/indesign-discussions/prefix-id-registration-web-page-missing/td-p/8883049 It's a few years old. I sent email to the address mentioned and didn't get a bounce but haven't received any response either. Is that current? If not, what is?
Hallo liebe Forummitglieder,ich bräuchte einmal eure Hilfe.Hier meine Formel:var B = this.getField("Berechnung_A").value;if(3 < B){this.getField("Ergebnis_Belastungsgrenze").value = "ja";}else{this.getField("Ergebnis_Belastungsgrenze").value = "nein";} Leider funktioniert die Formel nicht. Auch wenn der Wert sich verändert und > oder < 3 ist wird immer nur "ja" angezeigt.Wer könnte mir sagen, wo der Fehler ist bzw. was ich an der Formel ändern muss, damit es klappt. Der Wert aus der Ergebnis Belastungsgrenze wird berechnet. Danke und viele GrüßeStephanie
I have been poking around looking for such a sample and haven't found one. I need to save some add in specific data in documents when the add in is used. Thanks!
Hi all, I am using Adobe Acrobat Pro 2017 and I am trying to extract every two pages of a multi page PDF. The two pages that are extracted have an ID that can be searchable if all words in the document are put into a string. I have created similar code that works, but it is supposed to extract every page and rename it the first 8 digit code it can find using regular expressions. Take a look at the below code and let me know what you thing. Thanks!/* Extract 2-page funding notice */ // Regular expression used to acquire the base name of file var re = /\.pdf$/i; // filename is the base name of the file Acrobat is working on var filename = this.documentFileName.replace(re,""); for (var i = 0; (i * 2) < this.numPages; i++) { // Loop through the entire document numWords = this.getPageNumWords(i); // Find out how many words are on the page var WordString = ""; // Prepare a string for (var j = 0; (j < numWords; j++) // Put all the words on the page into a strin
Hi, I have a simple age calculator based on the year 2022 in one of my PDFs. If there's no data present in the year field, it automatically shows "2022" in the text. This is my code: // Get first field valuevar v1 = getField("Year 1").value;// Set this field value equal to the differenceevent.value = 2022 - v1; How do I get it to return a "zero" or no data, if the Year 1 field is left blank?
Hi,I would like to know how to create a javascript format file which I can save to my Acrobat javascript directory so that I can easily use that option for any pdf with one click. I tried it by pasting the script to notpad++ and saving the file as javascript format. When I moved that file inside installed acrobat javascript folder, I cannot able to see any option in my add on section in Acrobat. Thanks in advance for help.
Hi ! I´m trying to convert multiples documents of WORD (DOC and DOCX) to multiples PDF documents using the internal tool of Adobe Acrobat, but I´m having error messages like "the application that generated this document does not support drag-and-drop printing". Does anynoe know what is this ? It started to happen after updates of Adobe Acrobat and Office. Thanks !
I own and maintain the Perl library PDF::Builder, used for generating PDF files. I have encountered a possible problem with Adobe Acrobat Reader (64-bit) on Windows 10. The resulting PDF behaves as expected for "Tw" operators in the stream for core fonts and T1 fonts. However, it seems to be ignored for all the TrueType (.ttf) fonts I tried. Attached is a sample PDF, giving results for Times-Roman core font, English Towne Medium TrueType font, and URW Palladio-L Type 1 font. Each has a line with -5 Tw, 0 Tw, 3 Tw; and then a line with 10 Tc. The TrueType example also has a closed-up line where I individually place each word, emulating a 40% wide space. As far as I can see, the PDF is created with the expected Tw (or Tc) operators. Am I doing something wrong, or are TrueType fonts really a problem? The sample Perl program (as .pl.txt) is also attached, if you can read Perl. In the documentation for Tw, it mentions that it looks specifically for x20 ASCII spaces. For TrueType font o
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.