mateusz-matela / djvu-html5

HTML5 based DjVu file viewer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

URL parameter to specify which page to open?

loganjk opened this issue · comments

Hello, I would like to link to a specific page of a DjVu file on a dLibra website, not the first page. Is this currently possible with the HTML5 viewer? If not, can you consider adding a URL parameter like 'page' to define which page of the file is initially opened? Thank you for this project.

There's no such option at the moment.
I plan to add this to url, but I'm not sure when I'll have time to do it, maybe in a month.
Reading and applying the page number is pretty straightforward, but I still need to figure out if it's better to use url parameter or fragment, and whether current url should be changed when another page is displayed.

Thank you for working on this, it will be very helpful!

I like the idea of changing the URL when another page is displayed, since that will make it easier for users to share the URLs of pages that interest them.

About URL parameter vs. fragment, perhaps it would be good to use a URL parameter for this and use a fragment instead for something like a bookmark/highlighting of a specific section/text of a page, if that's a feature you eventually add. Also, if you add more URL display options (e.g., zoom or displaying two pages at a time), it might be strange for only this one to be a fragment. I guess it depends on what else you plan to do with the URLs. In any case, I will be happy to have a page option wherever you decide to put it.

Thanks!