Code Monkey home page Code Monkey logo

Comments (6)

tuxor1337 avatar tuxor1337 commented on August 14, 2024

It seems to me like this should rather be changed directly in the file itself: http://stackoverflow.com/questions/18846431/how-to-reassign-page-number-in-djvu-file

from document-viewer.

fugue88 avatar fugue88 commented on August 14, 2024

On Fri, 31 Oct 2014, tuxor1337 wrote:

It seems to me like this should rather be changed directly in the file
itself:http://stackoverflow.com/questions/18846431/how-to-reassign-page-number-in-
djvu-file

It is not a problem in the files that needs to be fixed, it is a feature
in the djvu format (and some other formats, such as pdf) that ought to be
supported.

from document-viewer.

tuxor1337 avatar tuxor1337 commented on August 14, 2024

Well, you refered to "page offsets" and there is no such thing in the djvu format specification. Look at the link above: there is something called "page titles" in the djvu format. Do you want to say, that document viewer doesn't support "page titles"?

For pdfs there are no "page offsets" either. But maybe you are talking about page labels, aren't you?

from document-viewer.

fugue88 avatar fugue88 commented on August 14, 2024

On Sat, 1 Nov 2014, tuxor1337 wrote:

Well, you refered to "page offsets" and there is no such thing in the
djvu format specification. Look at the link above: there is something
called "page titles" in the djvu format. Do you want to say, that
document viewer doesn't support "page titles"?

For pdfs there are no "page offsets" either. But maybe you are talking
about page labels, aren't you?

First off, my apologies. I did a poor job describing the "bug" in the
original report, so much so that even I couldn't figure out what it was
supposed to be about at first. :)

Okay, so this is about the feature in "book settings" where a user can
specify a custom "first page offset", with the description "index of first
page shown to user". Right now, it only allows non-negative values: 0 or
higher.

I'm requesting that this allow negative values as well.

This would be useful for many documents that have front matter before
getting to whatever page is labelled/named/considered to be "page 1".

For example, a file, such as a scanned book from archive.org, may have a
scan of the cover, a couple of blank pages, title, table of contents, and
finally get to "page 1".

With "first page offset" allowing only non-negative values, I cannot
adjust the viewer to line up with such a file, so that if a file refers
to, for example, "see page 113 for more info", I have to do the math
myself to figure out what page number to viewer calls that.

I hope I've described it adequately this time.

Thanks,
David

from document-viewer.

fugue88 avatar fugue88 commented on August 14, 2024

Here is an example file:

https://archive.org/stream/alicesadventur00carr/alicesadventur00carr.djvu

OR

https://archive.org/download/alicesadventur00carr/alicesadventur00carr_bw.pdf

Being a physical scan of a book, even changing the page labels wouldn't
help. I'd like the viewer's display of current page number to line up
with the book. This would require a page offset in the book settings of
-20.

Positive page offsets work for when the document is missing initial front
matter and other pages. For example, if the first page in a document is
page 32, an offset of 31 is what you want. But, I'm trying to go the
other direction.

from document-viewer.

tuxor1337 avatar tuxor1337 commented on August 14, 2024

Now I at least know, what's your point. (It was unclear, because document viewer does indeed lack support for page labeling in pdfs. And the right page labeling would in fact fix your problem - but only under the premise that document viewer does support page labels.)

However, your request is to allow negative values for this specific setting. That is easy. Here is my pull request that fixes this: #54

from document-viewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.