re. 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.

I discovered 'pdf.js' - a javascript program that converts pdf to HTML5
on-the-fly. I think if I use that as my pdf viewer in the browser, I can
hack the code to get it to do what I want -
http://mozilla.github.io/pdf.js/

Cheers, and thanks for responding
 -Mike


On Fri, Jan 17, 2014 at 4:02 AM, Peter Bjuhr <[email protected]> wrote:

>
> 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
>
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to