Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I want to have self modifying javascript

Posted on 2004-09-20
2
Medium Priority
?
367 Views
Last Modified: 2008-03-06
I am looking through the whole Acrobat Scripting Reference, and I am trying to find a way to modify the javascript on the fly. I am not extremely familiar with PDF Javascript so I may just be missing something. I am looking for a way to overrite existing javascript code. I have a couple of ways in my head but they all have problems. The first way seems the most basic. I would create the new javascript and add it to the doc. Once complete I would delete the old javascript. The problem is I don't see any methods or attributes atleast in the Doc that will allow me to delete the old code. Any ideas how I can go about this?
0
Comment
Question by:jj819430
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Author Comment

by:jj819430
ID: 12100263
I want this to all be done by Javascript within the document.
0
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 2000 total points
ID: 12100369
You don't have access to document level JavaScript from within JavaScript. You can however execute any JavaScript that you create in your script with the app.eval() method. So, if you don't have to store the JavaScript as actual JavaScript code, but can get away with storing it e.g. as the string content of a hidden form field you can execute it at runtime.
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever come up with a need of emailing only few pages of PDF file to one of yourfriend or colleague, instead of whole Adobe file? If yes, then surely you have face problems in doing that! Read this section as I have suggested multiple solutio…
This article focuses on how to remove password security from multiple PDF files by Adobe Acrobat program. Sometimes it is essential to access the stored data items and to print, edit as well as copy content from Portable Document Format files in abs…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
We often encounter PDF files that are pure images, that is, they do not have text characters, but instead contain only raster graphics. The most common causes of this are document scanning software and faxing software/services that create image-only…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question