[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

PDF to call function

Andrew Poulos

5/30/2016 6:47:00 AM

I'll be needing to do some coding of PDF documents that are viewed in a
web page so I've just started looking into what it can and can't do.

If I have a function in the "hosting" web page is it possible to call
that function from within the PDF assuming the PDF is being viewed using
the latest Adobe Acrobat Reader?

Andrew Poulos
6 Answers

Andrew Poulos

5/30/2016 6:56:00 AM

0

On 30/05/2016 4:46 PM, Andrew Poulos wrote:
> I'll be needing to do some coding of PDF documents that are viewed in a
> web page so I've just started looking into what it can and can't do.
>
> If I have a function in the "hosting" web page is it possible to call
> that function from within the PDF assuming the PDF is being viewed using
> the latest Adobe Acrobat Reader?

My bad. I just checked and Chrome is not using plugins to display PDF
but its "own" JavaScript files and an EMBED element.

Still is it possible to trigger a function in the HTML from the PDF?

Andrew Poulos

Evertjan.

5/30/2016 8:48:00 AM

0

Andrew Poulos <ap_prog@hotmail.com> wrote on 30 May 2016 in
comp.lang.javascript:

> On 30/05/2016 4:46 PM, Andrew Poulos wrote:
>> I'll be needing to do some coding of PDF documents that are viewed in a
>> web page so I've just started looking into what it can and can't do.
>>
>> If I have a function in the "hosting" web page is it possible to call
>> that function from within the PDF assuming the PDF is being viewed using
>> the latest Adobe Acrobat Reader?

Links in the pdf are clickable.

> My bad. I just checked and Chrome is not using plugins to display PDF
> but its "own" JavaScript files and an EMBED element.
>
> Still is it possible to trigger a function in the HTML from the PDF?

HTML has no inside functions. Could you refrase?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Osmo Saarikumpu

5/30/2016 3:22:00 PM

0

On 30/05/2016 09:56, Andrew Poulos wrote:
>> If I have a function in the "hosting" web page is it possible to call
>> that function from within the PDF assuming the PDF is being viewed using
>> the latest Adobe Acrobat Reader?
....
> My bad. I just checked and Chrome is not using plugins to display PDF
> but its "own" JavaScript files and an EMBED element.

At least in the WWW, you won't have any control on how pdf files would
be handled. In an environment where I have control, pdf files shall be
opened by an external application. And I assure you that won't be a
product from Adobe either.

--
Best wishes, Osmo

Thomas 'PointedEars' Lahn

5/30/2016 5:56:00 PM

0

Andrew Poulos wrote:

> [â?¦] is it possible to trigger a function in the HTML from the PDF?

Probably not.

--
PointedEars
FAQ: <http://PointedEars.... | SVN: <http://PointedEars.de...
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-...
Please do not cc me. / Bitte keine Kopien per E-Mail.

Luuk

5/30/2016 5:56:00 PM

0

On 30-05-16 08:56, Andrew Poulos wrote:
> On 30/05/2016 4:46 PM, Andrew Poulos wrote:
>> I'll be needing to do some coding of PDF documents that are viewed in a
>> web page so I've just started looking into what it can and can't do.
>>
>> If I have a function in the "hosting" web page is it possible to call
>> that function from within the PDF assuming the PDF is being viewed using
>> the latest Adobe Acrobat Reader?
>
> My bad. I just checked and Chrome is not using plugins to display PDF
> but its "own" JavaScript files and an EMBED element.
>
> Still is it possible to trigger a function in the HTML from the PDF?
>
> Andrew Poulos
>

maybe this could be a hint:
http://stackoverflow.com/questions/9219807/using-javascript-in...

Michael Haufe (\"TNO\")

6/1/2016 2:26:00 PM

0

On Monday, May 30, 2016 at 1:46:28 AM UTC-5, Andrew Poulos wrote:
> I'll be needing to do some coding of PDF documents that are viewed in a
> web page so I've just started looking into what it can and can't do.
>
> If I have a function in the "hosting" web page is it possible to call
> that function from within the PDF assuming the PDF is being viewed using
> the latest Adobe Acrobat Reader?

Generally you can't assume how the PDF is going to be viewed, and vice-versa the browser generally doesn't know how the PDF is being rendered (unless you are explicitly using <object> tag with a fixed CLSID [1]) In the latter case you then have to worry about browser security restrictions. Assuming you're past all of that, there is an API available you may be able to use, but I've little experience with using it myself [2]

[1] Example:
<object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024" height="600"> ... </object>

[2] <http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_referen...