Adobe Reader plugin interaction through Javascript
Asked Answered
B

1

7

I'm displaying PDF file that are generated on-the-fly within a ASP page. The PDF generation (and download to the client) can take some time and I'd like to provide the user with some feedback (a loading message or something).

AFAIK there's no way to know when the PDF is viewed because the DOM events get triggered when the Adobe Reader plugin gets loaded (even though it's not displaying anything yet).

I noticed that there's a Javascript API for the plugin object that I could potentially use. I notivced a LoadFile method on it but unfortunately it doesn't seem to do much. Adobe's documentation is really useless. It talks of Javascript only as a plug-in writting language or as OLE interaction (and poorly).

Is there any documentation for the API and is it possible to know when the PDF has been loaded? It would be perfect if I could pass on a PDF stream to a PDF viewer of some sort.

Benighted answered 7/8, 2009 at 12:31 Comment(1)
Have you found a solution how to interact with the plugin?Bouchard
P
2

I've wanted to the same, found a page that may help you out. http://www.adobe.com/devnet/acrobat/javascript.html

Pepsin answered 7/8, 2009 at 12:34 Comment(3)
Thanks but I've been there already and the API is for PDF scripting (that is, create a fancy PDF that does extra stuff) rather than scripting the reader plugin.Benighted
Sure but the sdk includes scripting the activex reader component too, simple automation though, if you find something about PostMessage and RecieveMessage I would also be very interestedPepsin
Have you found a solution how to interact with the plugin?Bouchard

© 2022 - 2024 — McMap. All rights reserved.