Details
-
Task
-
Resolution: Done
-
Not Evaluated
-
6.4.0 FF
-
None
-
35697c1ded (qt/qtwebengine/dev) 35697c1ded (qt/tqtc-qtwebengine/dev) 35697c1ded (qt/qtwebengine/6.4) 35697c1ded (qt/tqtc-qtwebengine/6.4), b8419577e (dev)
Description
So far we have been using only a zero-based page index, and in the UI we add 1 to it so that it becomes one-based (because most PDF files start on page 1). But actually many PDF files can have different sections with different numbering schemes: a book might have a preface with Roman numerals and then the actual content starts later on a nominal "page 1", and the index and appendices might be different sections with prefixes (like A1 for the first appendix page). So really a page number should be available as a string, and that's what we should display in the UI. SpinBox and QSpinBox are capable of showing strings. At the simplest, we just need an accessor in QPdfDocument to get the string for a page index. But we should also harmonize the API: any property of the form "int page" could be renamed to "int pageIndex" or "int pageNumber" so that we can reserve "page" to be the string form. QPdfBookmarkModel::PageNumberRole might or might not need renaming; etc.
Attachments
Issue Links
- is required for
-
QTBUG-77503 Prepare for a supported release of QtPDF with more features
- Closed