kindlepdfviewer
kindlepdfviewer copied to clipboard
page number offset
mostly the pdf books begin numbering after some 20 pages of introduction, toc etc. What is needed is a correct alignment between the physical page number and the true page number. An offset value shoud be stored in the filename.lua file that would be added every time a page goto function is evaluated.
eg :pdf file xx.pdf starts page numbering from page 12 as reflected in its TOC hence offset stored=11 when user enters a goto page number say "1" then offset+1 page is fetched.
Acrobat have a function called logic page number does this. You can "Numbering pages" with acrobat, and acrobat will recognize these page numbers.
kpdf just need to recognize this logic page number, but I'm not sure if it is supported in the pdf library.
Hm, I think those "logical numbers" are text based. Plus, they are allowed to repeat, I think. Well, I will have to check that.
Maybe a hotkey to mark "page 1" and store this with the document settings would be a good way to implement our own approach? Will need to think about this a bit.
Maybe it's simpler to implement with a marker in book.lua file than recognize logic page number. However there are more points other than just marking page 1. For example, user may want to jump to table of contents to know which page he need to go, so there must be at least 2 set of page numbers because the page of table contents always appear before the page 1 of content. Sometimes the logic page number assign A,B,C as page numbers before the real contents(A, B, C for pages before real content, 1,2,3 for real content).
I suggest this arrangement:
once page n is marked as page 1, all the page from 1 ~ (n-1) will be marked as b1 ~ b(n-1) (b can also be any other letter other than the first row letter which represent numbers). And user should be able to input b and number in input box directly (no need to use alt since the prefix b will not conflict with the number keys.)
Hi, folks ,any work going on this must have feature??
I wouldn't call it "must have", not even "very nice to have". It is just a "nice to have, maybe" type of feature. And certainly not for the November release because even IF it is ever implemented it has to be done very carefully to not impact the existing plain physical page numbers as for many books it is the only one anyway and everyone relies on being able to quickly jump to the physical page number without thinking too much about it.
If anyone's interested, this feature is present in Librerator.
The way it is implemented in Librerator is not a feature but a bug. The proper way to implement it is how it is done by Adobe Acrobat Reader for PDF or in djview4 for DjVu files, but that is not trivial. In fact, for DjVu files it is a complete nightmare, whereas for PDF files it can be done, but too much coding to make it worth it...
And why is it a bug?
Because it is not a support for logical page numbers as I just explained in the previous message. Try Adobe Acrobat Reader (with the pdf files containing logical page numbers) and see how it should work.
I will, but it still doesn't mean that this implementation is a bug just because there are better ones. I still think that existing working solution is better than non existing perfect solution. The goal was to allow the user to just use Go to 58 when she sees "see page 58" in the text she reads, without needing to calculate it every time.
Perhaps it can be a separate shortcut to jump to a logical page number so that the physical page number functionality is not affected? It looks like iText has logical page number support if that would be helpful as a guide.
This would be extremely helpful for me in using kindlepdfviewer for academic readings, since these are usually journal articles that start on page 1083 or some other nonstandard number.
In the absence of full logical page #s support, would it be possible to copy over the page offset functionality from librerator?
Well, I can implement this feature if you can wait till March 11th. I will have a 1 week holiday at that time.
Yes, that sounds great. Let me know if I can help with speccing it out when you're ready to start.