Scroll pdf in jweb

    Oct 08 2018 | 9:16 am
    Is it possible to programatically control scrolling of a pdf in jweb? I understand that jweb can receive js messages using executejvascript, but I'm no js programmer and I'm unclear how, or even if this would work to scroll pages of a displayed pdf. What I'm after is a way to turn pages in a score when certain time points are reached in an audio file... TIA

    • Oct 11 2018 | 10:28 am
      OK, I worked out that what I was missing was the quote marks, so now I've established (in between crashes) that whilst executejavascript "window.scroll(0, 150);" will work with an .html file, it won't with a .pdf. Is there any chance this, or something like it can be implemented at some time (once the .pdf crashing issue is solved, of course)?
    • Oct 11 2018 | 6:27 pm
      Regarding the crashing, there are some issues with CEF's PDF renderer that should be solved in a future update when we update to the latest CEF (Chromium Embedded Framework). This likely won't come out in our first big bugfix release, as it will require a longer testing run to make sure it doesn't introduce any worse problems than the ones it will solve.
      In the meantime, I would suggest to you a possible solution to both the crashing as well as greater control of your PDF documents:
      PDF.js should let you both view PDFs in jweb without crashing, and it also should provide you with an API accessible from your JS code to do things like move through the PDF document:
      Hope this helps!
    • Oct 12 2018 | 1:02 pm
      I'll look into, many thanks!
    • Oct 25 2021 | 2:20 pm
      I have had excellent results with jweb. What it is missing for me is the ability to send a simple "page #" message to control scrolling. I have multi-page PDF lead sheets with musical notation and lyrics . I want to control paging with the numeric pad
      Here is my algorithm (subject to some fine tuning):
      · Keys 1-9 jump to the corresponding page. (I can’t imagine one of my PDFs with more than 9 pages. Current max is 4.)
      (I am performing live with a wireless computer keyboard in hand accordion style.)
      I wonder if we can appeal to the developer to include a page message from the outside attached to the functionality already available inside with the sidebar. It might also be helpful to have an output that tells the number of pages.
      My Max patch.
      My Max patch.
    • Jul 14 2022 | 10:47 pm
      Hey Gary, I have been looking for something like this for years. Any chance you can share that patch? Thanks
    • Jul 15 2022 | 12:58 am
      Can't remember how long ago I made this. I have since replaced it with ForScore running on my iPad.
    • Jul 16 2022 | 11:14 am
      Thank you for replying Gary. Also thank you for the suggestion. if you ever find it, t would be awesome if you paste it that code here. I’ll be checking from time to time, thanks.
    • Jul 16 2022 | 4:12 pm
      here is a patch I used for pdf notation on Mac. it uses movie to display pages, some calcs are usings sips so shell external is needed. maybe it could be helpfull....
      P.S. it was made with max 6. max 8 as it seems can not load pdf files into movie objects any more, what a progress ...
    • Jul 18 2022 | 4:01 pm
      Thank you so much Source Audio for that patch. I will take it for a spin!!