lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PDF links to javascript?


From: Peter Bjuhr
Subject: Re: PDF links to javascript?
Date: Fri, 17 Jan 2014 10:02:29 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0


On 01/17/2014 02:00 AM, Mike Blackstock wrote:

Is there a way to change the "textedit://uri"  mechanism in PDF point-and-lick links to point instead to a _javascript_ function in the webbrowser?
I've been looking around, but I know zilch about PDF documents; the closest
I got was this, which tells me it's do-able (I think)

http://stackoverflow.com/questions/5934211/getting-notified-when-the-user-clicks-a-link-in-an-embedded-pdf/5942729#5942729


Re.  Why do you want to do this?

My source code editor is a _javascript_ app that runs in the browser - "Code Mirror". For compilation, the source code is sent to a server over a node.js/socket.io websocket; when compilation is complete, server sends browser a signal and PDF is opened in iframe. I need 'point-and-click' events to call _javascript_ functions.


As I see it you need to change either the PDF itself or the _javascript_ code run in the browser to achieve what you want.

If we assume the output from LilyPond is what it is, to change the PDF you have to change the links manually in Acrobat Pro like described in the stackoverflow page you link to. One alternative to this is to use SVG instead and manually change the links in the XML code. This can of course be very inconvenient if you have many links that needs to be changed.

If on the other hand you can change the _javascript_ code this can be achieved much easier, I think.

Best
Peter

reply via email to

[Prev in Thread] Current Thread [Next in Thread]