473,406 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

javascript for acrobat

Is there someone who could help with a javascript in Acrobat?
The context is a PDF document containing an alphabetical list of 1000 titles
(with individual links to other PDF documents) where the user has to make
his choice. Instead of letting him scan through this long list, we would
rather let him type what he is looking for, while a javascript would detect
the matching strings and stripdown the list along
with the typing.
Mostly only a few keystrokes (<10) would already be enough to reduce the
number of matching items to a fairly readable list, where the user could
then make his choice by hitting the link.

Thanks in advance for your help.

Mathilda D. Kerbacho


Jul 23 '05 #1
7 1966
On Tue, 8 Jun 2004 15:04:57 +0200, in comp.lang.javascript "denis"
<ke******@gmx.net> wrote:
| Is there someone who could help with a javascript in Acrobat?
| The context is a PDF document containing an alphabetical list of 1000 titles
| (with individual links to other PDF documents) where the user has to make
| his choice. Instead of letting him scan through this long list, we would
| rather let him type what he is looking for, while a javascript would detect
| the matching strings and stripdown the list along
| with the typing.
| Mostly only a few keystrokes (<10) would already be enough to reduce the
| number of matching items to a fairly readable list, where the user could
| then make his choice by hitting the link.
|
| Thanks in advance for your help.


AFAIK, you can't. A PDF file is static unless everyone has the full
PDF version installed that allows them to enter information into PDF
forms.

Why not create a web page and use a bit of javascript to control the
user select.
Jul 23 '05 #2
AFAIK, you can't. A PDF file is static unless everyone has the full
PDF version installed that allows them to enter information into PDF
forms.

Javascript works fine with Acrobat (XML forms) ;
the syntax is slightly different from web environment but the features are
more or less the same.

M.D.K.
Jul 23 '05 #3
Mathilda,

"denis" <ke******@gmx.net> wrote in message
news:10*************@corp.supernews.com...
Is there someone who could help with a javascript in Acrobat?
The context is a PDF document containing an alphabetical list of 1000 titles (with individual links to other PDF documents) where the user has to make his choice. Instead of letting him scan through this long list, we would rather let him type what he is looking for, while a javascript would detect the matching strings and stripdown the list along
with the typing.
Mostly only a few keystrokes (<10) would already be enough to reduce the number of matching items to a fairly readable list, where the user could then make his choice by hitting the link.

Thanks in advance for your help.

Mathilda D. Kerbacho


Acrobat v4/v5/v6 JS all support a 'keystroke' event for fields (includes
lists/combos) and you can use this to hook the script you'll need. As
for scripts here are couple of suggestions:
http://www.oreillynet.com/pub/a/java...nygoodman.html
and
http://www.devarticles.com/c/a/JavaS...t-As-You-Type/
....you may need to adapt any advanced DOM stuff for Acrobats more
limited JS object model.

Another good place to look for Acrobat JS help is www.planetpdf.com
including their free and helpful user-to-user forums.
HTH

Mark Anderson
Jul 23 '05 #4
Mark Anderson wrote:
As for scripts here are couple of suggestions:
http://www.oreillynet.com/pub/a/java...nygoodman.html
and
http://www.devarticles.com/c/a/JavaS...t-As-You-Type/ Both well documented and close to our purpose, especially the latter.
Many thanks for the clue.
...you may need to adapt any advanced DOM stuff for Acrobats more
limited JS object model.

Is it feasible?

M.D.K.
Jul 23 '05 #5
Mathilda,

"Mathilda D. Kerbacho" <ke******@gmx.net> wrote in message
news:10*************@corp.supernews.com...
Mark Anderson wrote:
As for scripts here are couple of suggestions:
http://www.oreillynet.com/pub/a/java...nygoodman.html and
http://www.devarticles.com/c/a/JavaS...t-As-You-Type/

Both well documented and close to our purpose, especially the latter.
Many thanks for the clue.
...you may need to adapt any advanced DOM stuff for Acrobats more
limited JS object model.

Is it feasible?

M.D.K.


Not in a position to test right now. you just need 2 form elements -
either text box and list box, or perhaps just a combo. If I were trying
this I'd strip all the DHTML references (e.g. getElementById etc.) and
put placeholder comments. So now you have the basic JS logic and just
<g> need to replace the placeholders with the correct JS names (think
core JS in a different DOM). Make sure you have the JS Guide for
Acrobat to hand. In v4/v5 it was on the Acrobat Help menu. Not sure
where it is on v6 - you might need to dig out your install disk (in all
cases the doc is a PDF).

If you get stuck I commend you to the JavaScript sub-section of the
PlanetPDF user-to-user forums - there are some very experienced and
friendly PDF+JS folk there.

Regards

Mark
Jul 23 '05 #6
Thank you, Mark.
Your suggestion is encouraging. I'll try.
If you get stuck I commend you to the JavaScript sub-section of the
PlanetPDF user-to-user forums - there are some very experienced and
friendly PDF+JS folk there.

I have posted my question there. Feasibility was confirmed.

Kind regards.

M.D.K.

Jul 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ian Sedwell | last post by:
Hi guys I am writing a Javascript routine to check for the presence and version of an Adobe Acrobat PDFViewer on the user's machine. No problem with any browser on the Mac, no problem with any...
5
by: Don Lancaster | last post by:
I am conjuring up some simple JavaScript animation routies that work entirely WITHIN Acrobat .PDF files. They work very well but they are waay too fast! And are also CPU speed dependent. I...
5
by: Picco | last post by:
How can i set a asp variable with a value in Javascript? JS Code: <script language="JavaScript" type="text/javascript"> <!-- if (acrobat.ver5) { // if Acrobat 5.0 or newer is installed,...
3
by: Joris De Groote | last post by:
Hi, I use Adobe Acrobat to read tekst from PDF files. After that the file has been read, I move the file in a folder (using the date I got from the text I got from Acrobat). Now here is my...
0
by: Per | last post by:
Is there anyone who's been able to program the new Adobe Acrobat Javascript (7.05) using Visual Basic in Access 2003? I have downloaded the documentation from Adobe's website (Programming Acrobat...
3
by: frenchy | last post by:
I am getting this error in Adobe after struggling with a 'submit' button on an acrobat form that is in production and all the other appdev people in the office are NOT having a problem with. It...
1
by: Veerle | last post by:
Hi, I have a web page and at the end of the page I have inserted some javascript that checks if Acrobat Reader plugin is installed. If it is not installed, I disable some elements (buttons,...
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi all people, everybody, We have multiple versions of Acrobat Reader from 5.x to 8.x, I want to create a method in C# or VB.NET to check to see if the registry key for the versions...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.