Solved

I want to have self modifying javascript

Posted on 2004-09-20
2
359 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
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 500 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How to stream a PDF 7 106
How to create a living or dynamic document 11 82
Adobe PDF link to folder 5 47
Outlook 2013 and Adobe 3 45
This article is in response to a question here (http://www.experts-exchange.com/Other/URLs/Q_28283850.html) at Experts Exchange. The Original Poster has a scanned signature and wants to make the background transparent so that the signature may be pl…
Power PDF (http://www.nuance.com/for-business/document-imaging-and-scanning/power-pdf-converter/index.htm) is the newest product from the Document Imaging division of Nuance Communications (http://www.nuance.com/). It is available in two editions — …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…

758 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now