🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.reader
Article #3166

controlling pdf reader embedded in air application via htmlloader wrapper...

#3166
From: mitesh_patel
Date: Sat, 29 Nov 2008 17:58
9 lines
2000 bytes
I am trying to create a note-taking application in air. I want to extract selected text from pdf file (opened via HTMLLoader wrapper) and directly paste it in a textarea (or similar text controls, like textInput), may be through clipboard.

Obviously, all pdfs in my local storage will not be scripted to recieve postMessages and act accordingly, and that is not practical either. So, my problem is, how can I copy the text selected in the pdf file (opened as an object in htmlloader) to clipboard or directly in another control by say clicking a button in air application? I suppose, this is possible using javascript, however, I don't know which reader methods are exposed to the wrapper htmlloader control. In short, I want to execute app.execMenuItem("Copy") command through htmlloader javascript. Any alternate solutions are also welcome.

This is similar to passing inbuilt commands/methods/functions (of adobe reader) to pdf-reader plugin embedded in a webpage via javascript. This is possible in IE where the pdf is rendered as activex object, and hence JSObject interface of pdf document/reader is accessible to the browser javascript. I have also read that this same JSObject is accessible to VB as interface for IAC, so as the Air is Adobe's own product, I was wondering if equivalent of JSObject is accessible to htmlloader control as well.

Thanks in advance...

Mits
Technical Details
Message-ID: <59b72392.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!goblin1!goblin.stu.neva.ru!feeder2.xentech.net!news4us.nl!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: 10273d,3d128dd2f6a36da,start
X-Google-Attributes: gid10273d,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: mitesh_patel@adobeforums.com
Newsgroups: adobe.reader
Subject: controlling pdf reader embedded in air
 application via htmlloader wrapper...
Message-ID: <59b72392.-1@webcrossing.la2eafNXanI>
Date: Sat, 29 Nov 2008 09:58:25 -0800
Lines: 27
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!goblin1!goblin.stu.neva.ru!feeder2.xentech.net!news4us.nl!webcrossing