Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

DjVu-hyperlinking to arbitrary page offset?

monday2000
2010-01-13
2012-11-08
  • monday2000
    monday2000
    2010-01-13

    Let's discuss an idea of implementing the DjVu-hyperlinking to an arbitrary
    offset on a DjVu-page.

    AFAIK for now the DjVu specification does not provide it.

    But it could be implemented somehow differently. It is possible to use
    Highlight Area DjVu-annotation (its upper left) as an "anchor" - on a
    target DjVu-page. This annotion may be invisible. Its comment should include
    some special-formatted string - to denote it as an anchor - including its
    number (on a page).

    The anchor name could be added to the end of the nowadays DjVu-hyperlink (in
    a usual HTML manner).

    This mechanism might be perhaps implemented in WinDjView (if its author would
    agree :) ).

    Tell your ideas about this matter.

     
  • Could you clarify exactly what you mean by arbitrary offset? You can put the
    link anywhere you want on the page. But it does require using absolute
    positions. By arbitrary I'm not sure what you mean. Do you mean, you want the
    viewer do be able to decide where to place the annotation. Do you mean you
    want the position specified in a logical coordinate system instead of the
    physical coordinate system? Do you mean you want the position to be relative
    to the display window, rather than relative the full image?

    Please clarify.

    Thanks,

    Bill

     
  • monday2000
    monday2000
    2010-01-14

    I mean - when you click a hyperlink in a multypage DjVu, you can jump (as a
    result) only to the beginning of another page in this multypage DjVu -
    but not to, say, middle (bottom or any arbitrarily-offset-from-top-of-page
    position) of the target page.

     
  • I see. I think the sane way to implement this would be an "anchor" type
    annotation. An in document link, or for that matter an external link could
    then reference that anchor. It would probably be sane to make the shape of
    anchors rectangles. The viewer would then display the upper left corner of the
    anchor and as much of the rest of the rectangle that could fit within the
    viewing area. Or if we wanted to make it more complicated the anchor reference
    could specify which corner must be displayed.

    Bill

     
  • monday2000
    monday2000
    2010-01-15

    docbill
    But the official DjVu specification does not include such special feature,
    right?

    How to ask Caminova to modify the DjVu specification - to include this
    feature?

    Otherwise - maybe DjVuLibre authors would elaborate some new standart for such
    "extended" hyperlinks - and would include it in the future realeases of
    DjVuLibre as some kind of the "DjVuLibre-specific-extension"?

     
  • For the most part, Leon and Yann are the only people that need to be
    convinced. If they both agree it is a good idea, they will get the other key
    players to agree to it. One nice think about the way DjVu is implemented, is
    any unrecognised annotation is ignored. So it is possible to implement
    experimental annotation changes in some applications while still trying to
    convince other key players to implement the same extensions.

    Bill

     
  • Leon Bottou
    Leon Bottou
    2010-01-15

    For the most part, Leon and Yann are the only people that need to be
    convinced.
    If they both agree it is a good idea, they will get the other key players to
    agree to it

    Things are not that simple. For instance, after eight years, there is still
    no consistency between djvulibre and celartem-djvu for something
    as simple as escape sequence in annotation strings.

    On the other hand, we (djvulibre) have been faster in
    implementing changes made by Celartem.

    Incidently, you can link to any part of a page by
    using the "showposition" cgi option.
    That works in djview4 and celartem=djvu.

    See .http://djvu.sourceforge.net/doc/man/djview4.html

    - L.

     
  • arichikato
    arichikato
    2010-01-18

    I think, it could be something like this: bookmark url (or hyper-link href)
    = #15~0.456. That means page 15, 45.6% from top of the page.

     
  • monday2000
    monday2000
    2011-06-22

    leonb

    Incidently, you can link to any part of a page by using the "showposition"
    cgi option. That works in djview4 and celartem=djvu.

    I tried it in djview4 under Windows - but it does not work. But even if it did
    - it would not be enough.

    What about introducing a new option into djvused? I mean some kind of the
    "arbitrary offset hyperinks"? It could look like described in the previous
    post: #15~0.456. And introduce also some "anchor" type annotation - like
    docbill suggested earlier.

    Without such feature - arbitrary offset hyperlinks - the DjVu format
    navigation looks outdated, retrograde and crude.

     
  • Leon Bottou
    Leon Bottou
    2011-06-23

    Djview4 supports something more powerful than that.

    See the the 'djvuchange.txt" document in djvulibre:

    5- CGI STYLE OPTIONS IN MAPAREA AND OUTLINE LINKS

    Outline and maparea annotation are
    UTF-8 encoded strings that can be
    interpreted as page specification (see section 3.1)
    or as percent-encoded URLs (see section 1.3.)

    In addition, strings starting with a question mark '?' are
    interpreted as CGI style options separated by the
    ampersand character '&'. These options are ignored
    when the maparea link target is another window.
    Otherwise these options are passed verbatim to the viewer.
    This can cause portability problems because different djvu
    viewers support different sets of CGI style options.


    And I just checked that a hyperlink like
    "?djvuopts&page=2&showposition=0,.46&zoom=300"
    does exactly what it is supposed to do.

    - L.

     
  • Syafz
    Syafz
    2011-10-11

    leonb

    Djview4 supports something more powerful than that.

    See the the 'djvuchange.txt" document in djvulibre:

    5- CGI STYLE OPTIONS IN MAPAREA AND OUTLINE LINKS

    Outline and maparea annotation are
    UTF-8 encoded strings that can be
    interpreted as page specification (see section 3.1)
    or as percent-encoded URLs (see section 1.3.)

    In addition, strings starting with a question mark '?' are
    interpreted as CGI style options separated by the
    ampersand character '&'. These options are ignored
    when the maparea link target is another window.
    Otherwise these options are passed verbatim to the viewer.
    This can cause portability problems because different djvu
    viewers support different sets of CGI style options.


    And I just checked that a hyperlink like
    "?djvuopts&page=2&showposition=0,.46&zoom=300"
    does exactly what it is supposed to do.

    - L.

    thanks leonb. :)

    inspiredmagz