lilypond-user
[Top][All Lists]
Advanced

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

Re: PDF links to javascript?


From: Mike Blackstock
Subject: Re: PDF links to javascript?
Date: Fri, 17 Jan 2014 16:52:17 -0500

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 <address@hidden> 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


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]