Questions tagged [adobe-javascript]

32 questions
3
votes
1 answer

Programmatic validation + submit in an Acrobat PDF form

Upon pressing the "submit" button of my PDF form, I'd like to do something (set a field to readonly) conditionally on the success of the form validation and submission processes: if (form.isValid()) { submitForm(...); if…
cjauvin
  • 3,433
  • 4
  • 29
  • 38
3
votes
1 answer

When is "var" parsed?

Sometimes var affects code before it, and sometimes not. Take this example: base.jsx: $.global.a = 1; $.writeln("a: " + a); var a = 2; Running this prints a: 1. Running $.evalFile("base.jsx"); also prints a: 1. However, running (function() { …
dln385
  • 11,630
  • 12
  • 48
  • 58
2
votes
2 answers

Javascript regex invalid quantifier error to find 8 digit number in PDF

I have the following javascript code: /* Extract pages to folder */ // 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 =…
2
votes
1 answer

Annotate the pdf file on the location clicked by user

I am having trouble in trying to find the solution for the below described problem. Annotate the PDF file when user clicks on specific location in pdf and then finaly save the pdf which in future opens at annotated location. How to approach…
analyticalpicasso
  • 1,993
  • 8
  • 26
  • 45
2
votes
1 answer

Import image in Acrobat using JavaScript (preferred on document-level)

I am going to implement a dynamic legend using JavaScript in Adobe Acrobat. The document contains a lot of layers. Every layer has an own legend. The origin idea is to implement the legend so, that it contains the images in a dialog box for the…
Alexito
  • 483
  • 1
  • 6
  • 15
1
vote
1 answer

Adobe Javascript object - List and Create folders within a Portfolio file

I'm using Acrobat PRO DC and Excel VBA to automate some interaction with Adobe Portfolio PDF files. Using the Adobe JSO, is there a way to get a list of existing portfolio subfolders? Or to create new ones? I'm able to add an attachment to a…
srclark
  • 23
  • 2
1
vote
0 answers

What is a good way to change fields in livecycle-documents without triggering validations?

I got a form with lots of fields and many scripts so I broke it down to my very fundamental problem with this example: Before printing I check if everything is filled out with: Seite1.execValidate(); The validate XML source of the…
Cold_Class
  • 3,214
  • 4
  • 39
  • 82
1
vote
1 answer

Detecting rotated pages in Adobe Acrobat

I am working on a Javascript plugin for adobe acrobat. The goal is to add a field with version specific text to each field. The wrinkle is that pages are of different sizes, and some are in portrait and others in landscape, and I need to put the…
Ethan48
  • 241
  • 3
  • 10
1
vote
2 answers

Acrobat JavaScript this.submit(url, false) does not work on Chrome PDF Viewer

I have a PDF document, using a button on the form I submit to a URL using this.submitForm(url, false); works fine with Adobe Reader Plugin but not with Chrome PDF Viewer, does Chrome PDF Viewer submit forms using a different method?
Karaman
  • 395
  • 1
  • 7
  • 19
1
vote
1 answer

PDF date of print

Is it possible to show the date/time of viewing/printing of a PDF document? I guess it has to involve Adobe Java Script but I'm not entirely sure this is at all possible. I do have Acrobat X Pro and I can be sure the pdf will be opened with…
Remo.D
  • 16,122
  • 6
  • 43
  • 74
0
votes
0 answers

JavaScript for printing PDF in browser

I have some javascript working to print a pdf document when you open Adobe Acrobat Reader on a desktop. Is there a setting or programmatic way to enable this to do the same thing in the browser? Example of what this looks like in the Adobe Acrobat…
Julie
  • 1,941
  • 3
  • 17
  • 30
0
votes
1 answer

In Adobe Acrobat Javascript, how can I force a page to become "editable" before a certain part of a script acts upon it?

What I'm trying to do: Iterate over each page in a PDF, and extract the number of words on each page. What is happening instead: The code below will return 0 words for any page that has not become "editable". Although I have selected for all pages…
0
votes
0 answers

Fillable pdf does not work with different devices

I have created a fillable pdf with some controls to lock fields that include two set of signature. One signature field for an instructor (Signature 1) and the other field is for a student (Signature 2). The instructor is able to sign of the pdf form…
Nimy Alex
  • 155
  • 1
  • 3
  • 13
0
votes
1 answer

Save annotations into SQL Server database using adobe javascript

I am having problems trying to save (insert) a .pdf with annotations into a SQL Server database. The database is located inside Visual Studio and I am currently using adobe javascript to save it, but I run into security settings prevent access to…
tre3948
  • 1
  • 3
0
votes
0 answers

How to get an export value of the radio button group in acroforms using javascript?

I am making a fillable pdf for a questionnaire in pdf. I have to use radio buttons in the questionnaire. I used the below code snippet to get the value of the radio button group, but it gives me either a null exception or return blank. I tried a…
Nimy Alex
  • 155
  • 1
  • 3
  • 13
1
2 3