『アドビコミュニティフォーラム』に質問/トピックを投稿する方法
Unlock the power of Acrobat SDK through our community.
新着順
Hello all,I'm trying something very simple (at least, it seem like it should be simple!) but I can't seem to get it to work.I'm running Pro DC.I have a form on a pdf with the file name "front.jpg", which contains ten rows of ten square text fields (100 in total). They are labelled Front_A1, Front_A2, Front_A3...Front_A10, then Front_B1, Front_B2, Front_B3...Front_B10etc, up to Front_J10.They are all set with the fillcolor to white (from the colorpicker wheel...). I need them to change their background color to black when the user clicks into the field. If the user then clicks in the field a second time, I want the background colour to return to white.There is also a second pdf that is attached to the first, entitled back.pdf. contains 100 identical fields, but the horizontal order is reversed, so they go from Front_A10 down to Front_A1, as you read from left to right, and so on down the page.Then I want to set up a button on the page, that will do the following actions:1) Check the fil
This is an extension of a previously answered question:PREVIOUS THREAD:I am using a calculation script to calculate age from a DOB field. It works just fine for the calculation and I can manipulate it to calc either in months or years. The problem is I want to have any ages < 1 year old to show the age in months and ages > 1 year old to show the age in years. Hopefully that makes sense. I have been searching through the existing threads and can't seem to find anything to help this specific need. If there a way to do this - maybe an additional IF clause? Here is my current calculation script.PREVIOUS CORRECT ANSWER:event.value = "";var dobValue = getField("Kid.DOB").value;if (dobValue!="") {var dob = util.scand("mm/dd/yyyy", dobValue);var today = new Date();var age = today.getTime() - dob.getTime();// compute age in millisecondsvar nAgeMilliseconds = today.getTime() - dob.getTime();var nAgeYears = ( age / (1000 * 60 * 60 * 24 * 365.2425) - 0.005);if(nAgeYears < 1){// Change to
I am trying to follow this walk through: https://acrobatusers.com/tutorials/change_another_fieldmy code for the first part is:if( event.willCommit ) { if(event.value == "") this.resetForm(["Account Manager","MOBO","Customer","CNAME","Contact","Cphone","ADD1","ADD2","CPPC","CN1","CN2","CN3","CN4","CN5","CN6","CN7","CO1","CO2","CO3","CO4","CO5","CO6","CO7","CO8","EUI"]); else SetFieldValues(event.value);}and my code for the second part is here: WeTransfer I keep getting a syntax error...the file Im working on is here: WeTransfer I am trying to learn Java, and do not claim to be fluent in this coding.any help would be amazing!... thank you!
Hi all,maybe the answer to my question is so obvious, that I just can't find it, I don't know. So here I am, hoping for some help.I programmatically like to add annotations. I already know how to do that. I started with the JavaScript for Acrobat API Reference and a Guide called Developing Acrobat Applications Using JavaScript.Question in short: How can i determine the correct rect size of the freetext annotation, so that the whole text i place in there is shown? Is there a function to calculate the width and heigth of multiline or single line Text?Example:var annot = this.addAnnot({page: 0,type: "FreeText",textFont: font.Helv,textSize: 10,rect: [200, 300, 200+200, 300+3*12],contents: "Line1!\nLonger Line 2!\nReeeaaaaalllyyyy loooooong Line3!",author: "Me",width: 1,alignment: 0 });I already know how to get the quads from Words inside the document. So I thought I add a new page, write the text that should appear in the annotation, get the quads, transform to rect, delete the page and ha
I have a form with several variables created from splitting data from another numeric field. The goal is to take even numbered places and multiply by 2 and odd numbers by 1. So, a number 5578; position 1 is 5 with 1 being an odd number would multiply by 1 for a variable value equaling 5. Position 2 is also 5, 2 being even would multiply by 2 equaling 10, and so on. At the end of the say I want to take all the equated numbers and add them together as follows based on the example: 5+1+0+7+1+6; so the variables that result in a double digit would need to split into single characters like I am doing with the original field value. I don't have any issue doing this in straight js on a web page, but I am not sure how this is done in Acrobat everything I have tried throws an error. Root question, how do I split a 2 digit variable into 2 separate variables?The I have broken my field value out into vars such as digi1, digi2, digi3, and digi4.In js on a webpage I can have the followin
Hello! I need help with a PDF form. I use Acrobat PRO DC. (hope i'm clear, english is not my first language, sorry!) I have a PDF with a table of contents, and the rest of the pages (i created templates with them) are hidden. When i click on a radio button in the table of contents, only the concerned page shows, but it doesn't go to the page. I want it to go to that page.I tried with the preset in Acrobat, but it doesn't work. For example, i write to go to page 4, but when the pages hide and then show again, it replaces what i wrote with page 1... I need a javascript that would tell "go to the template "XXXX". Is it possible? Or maybe "go to last page". Can somebody help me? Thanks!
Hi,I have a script running but I am running into an issue between using the text fields and checkbox.Text1 has a default value of 15, this is multiplied by Text2 which the user can set (say for this example 6) + the value set to the checkbox (say 50). When the Text2 and the checkbox are empty the Total field is displaying "0Off" and if I fill in Text2 with 6 (15*6=90) it will show 90Off and with the checkbox finally checked it then displays the total of 140or if I change the Total field format to "number" I get an error message whenever one of the fields changes "The value entered does not match the format of the field [ Total ]" and does not 0 back out when the Text2 or checkbox are emptied again.Here is the code I am putting into the Total field for reference. event.value = ( this.getField("Text1").value * this.getField("Text2").value ) + this.getField("checkbox").value;
Can anyone help, i have very limited Javascript knowledge. I am setting up a form, with two check boxes as below. When NO is selected then YES is unselected, but also the text fields below to be hidden and when Yes is selected then NO to be unselected and the text fields to be visble.I can either get the two check boxes to work. or the No to hide the fields, but not both.Is anyone able to help.
So, I am trying to figure out how to get code to run within the console. It seems like for simple things like 1+2 it works but any functions I have written as a document JS does not work. What am I missing? For reference, I am splitting some files...function Split() { var totalPages; var i; var arrNames = [ "SOME ARRAY HERE" ]; var targetPath = "/C/Users/SOMEPATH/"; totalPages = this.numPages; try { for (i = 0; i < totalPages; i++) this.extractPages({ nStart: i, cPath: targetPath +arrNames + ".pdf" }); console.println(targetPath +arrNames + ".pdf"); } catch (e) { console.println("Abort
Hi,Is it possible to detect in an Adobe Plugin if the active document being opened displays/has the (SECURED) flag set?If so, how would we go about checking the status of this flag?
Hi,Does anyone know if it's possible to check within an Adobe plug-in if the content of the selected document has changed? (e.g. Via Adobe Acrobat).Essentially I want to be able to say:-if document content changed, save using PDDocSaveWithParams (as it needs to save to a different folder etc..)-else save using AVDocDoSave*This is to get around an issue with using PDDocSaveWithParams with protected/secured documents.
Hello, I wonder if anyone could please point me in the right direction of how to achieve the following:Acrobat DCI have a drop-down box which contains five items. I have managed to change the colour of the text for each item when selected within the drop-down box. What I would really like to do is to change the background colour of 5 different text fields as well. So selecting item 1 turns the text red in the drop-down and also makes the background colour of a text field red. selecting item 2 makes the text turn blue in the drop-down and also makes the background of an additional text field blue. And so forth... No selection means the colour is transparent.I cannot get my head around this. If anyone could please point me in the right direction I would be eternally grateful.
Thanks in advance for everyone's help. I'm using Pro 11.I'm creating a document template where I need certain textboxes to change based on whether a specific box contains certain text, but where there is still other text in the box. For example, if the primary textbox contains "2019-PR-123" I would like a separate box to return "Product", but if the box contains "2019-LM-123" I would like the separate box to return "Labor". But I want the return values to be only based on whether the primary box contains the "PR" or "LM" irrespective of what the other numbers are.I've searched and searched and can't seem to find a simple way to do this. And I'm easily able to achieve the result of the primary textbox contains only the "PR" or "LM" using an if/then based on the value of the primary box, but I need it to do an if/then based not on the value of the box but whether the box includes certain text within the large text.
hello. I have integrated custom plugins with Adobe Acrobat DC . but these plugins are available in the Acrobat DC of my local system. In order to share them with the third party/end-user, we thought of integrating these Acrobat plugins to Adobe Document Cloud so a third party can access them from cloud. How can that be done???
when there are several fields required that are not filled out, how can i either list in the alert the fields and / or take the user to the first required field with a focus?
In other words, if I create a catalog file, can I read that catalog file via a Python, C#, Java or program in a different language and return a list of files to the user that contain the person or place name searched for? This would allow us to make our archive of PDF files searchable on a web site. We do not want Google to search these files, they are not publicly available. Users need to log into the web site before they will be allowed to search and download PDF files matching their criteria. Also, it would be great if the search would not just return the file name, but some context of each match. Is there something like this? If even just the indexes of the PDFs are accessible via API, it might be possible to use a library like BeautifulSoup to satisfy this need.
Right now I have the following script in my form://</ACRO_script>//</AcroForm>//<AcroForm>//<ACRO_source>AreaDuesQty:Calculate</ACRO_source>//<ACRO_script>/*********** belongs to: AcroForm:AreaDuesQty:Calculate ***********/var A = +this.getField("ChptTotQty").value;var B = +this.getField("AffTotQty").value;if( A > 0 ) event.value = A + B;else event.value = "";It works great as long as there is a number in the "ChptTotQty" But, I want it to give me a number whether there is a number in "ChptTotQty" or "AffTotQty" field. Is there a way to make "if ( A > 0 ) event.value = A + B;" Into "if ( A > 0 ) or ( B > 0 ) event.value = A + B;"Any help would be greatly appreciated.Thank You
After entering a Custom Keystroke Script in the edit box, the script works but it disappears from the edit box when revisiting the format properties.It is also not shown in the "Edit All Scripts" lists of scripts.Even after saving the file and opening it again, the script is gone but still works.Using Acrobat Pro DC 2019.012.20035Note: There is no Custom Format Script; only a Custom Keystroke Script.How can I view the Custom Keystroke Script again and update it?Thanks
Hello guys!I tried finding a solution for this over the past 2 weeks, but I didn't come to a reasonable conclusion.Let me describe what I have and what I need to do: I have a pdf form which gets filled by the staff at my office and I need a button to save (silently if needed) the file based on different text field values (numbers and letters), in the same folder as the original form. It would be nice to flatten everything before so people won't tamper with what was filled, but that is another discussion.This being said, during research on the forums, I saw that the saving function of pdf's is not straightforward (meets the purpose of pdf, of course) and I need 2 things:- a script which I would place in the folder that I use and/or in the install directory of Adobe Acrobat- the script that goes in the button itself.I already saw that people have tackled various varieties of this issue (either same folder or field based save as), but not both at the same time. I tried putting together so
Hi,I created a custom action which executes a javascript script on selected files.Rather than starting the action from Acrobat and selecting the files, I would like to select them in Windows Explorer and launch the action through a context menu item (like we do with the default "Combine files" item).Is it possible to create a right-click menu entry which tells Acrobat to use the selected files for a given custom action?Thank you in advance for your help.
Can somebody help me create a javascript in Adobe Acrobat Pro to make a single layer invisible and visible again with the clicking of the mouse by only using one button? e.g 1st click to make the layer invisible and the 2nd click to make it visible again. And then to repeat this for other layers. Thank you!
Hi!I am new to acrobat plugins. I am having set of tools developed in acrobat java script like auto bookmarking. I wanted to convert this into plugins using c++. I dont know where to start and how to start. Can any one help me on this? How to create? Which platform is required to create plugin? How to create .api file?Ariv
Hello,I got a question.I have 8 fields which could be ted from 1 to 6 and if they could not be rated for certain circumstances it would get the value of x.I wanat to calculate the avarage of rated parameters.When I use the "average" function in calculation the number of enetered information would be fixed. That means if all parameters are rated the result is ok but if a parameter could not be rated it ruines my calculation (while the number of species are fixed in this case 8).Isthere any solution for my problem? such if a value is not zero it counts otherwise should be negelcted.Please help me.BR
i have tried 2 methods to add a way to show/hide a label from a dropdown event.method 1 - add to the dropdown > format > custom keystroke scriptvar lblServiceUnit = this.getField("lblServiceUnit"); var FacilityType = this.getField("Facility Type"); console.println(FacilityType.value);if (FacilityType.value=="Federal") { lblServiceUnit.display = display.visible; } else { lblServiceUnit.display = display.hidden; } when i change the drop down it always seems to printout the last value and not the current value. i am changing the dropdown via mouse.method 2 - dropdown > actions > select trigger > ? mouse up or onblur or mouse exitthe javascript added here is the same as above but it does not seem to fire at the right time. i have to click out and sometimes click back into the dropdown to see it fire.
Hello everyone,I've come across some tricky issue while accessing the values of my fomular fields. Some of them had blanks at the end, so when I tried to access them like this ...Private Sub GetFormularValues(ByVal p_arrElement As String, p_intColumn As Integer)Dim AcroApp As Acrobat.CAcroAppDim AcroPDDoc As Acrobat.CAcroPDDocDim AcroAVDoc As Acrobat.CAcroAVDocDim JSO As ObjectDim i As IntegerDim f As ObjectDim fn As StringSet AcroApp = CreateObject("AcroExch.App")Set AcroPDDoc = CreateObject("AcroExch.PDDoc")'/ Check if the document can be opened for accessIf AcroPDDoc.Open(p_arrElement) ThenSet JSO = AcroPDDoc.GetJSObjectWith JSO'/ If there are fields in the document, write their values onto first sheetIf .numFields ThenApplication.ScreenUpdating = FalseFor i = 0 To .numFields - 1fn = .getNthFieldName(i)Set f = .getField(fn)Sheet1.Cells(p_intColumn, (i + 1)).Value = f.ValueDebug.Print f.ValueNext i Application.ScreenUpdating = TrueElseMsgBox p_arrElement & " is empty!.")End IfEnd
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
すでにアカウントをお持ちですか?ログイン
アカウントをお持ちではありませんか? アカウントを作成
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.