[ https://issues.apache.org/jira/browse/PDFBOX-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14543489#comment-14543489 ]
Tilman Hausherr edited comment on PDFBOX-2786 at 5/14/15 11:17 AM: ------------------------------------------------------------------- I haven't understood the 2nd part of your argument "Only someone interested in COS would do that..."? The problem that getPageNumber() solves is just what's in the javadoc. It returns a "pure" page number, if there is one and -1 if there isn't a page number. Of course I don't know what the users are doing, but it could be that people are using it to identify a page number based destination, and assign that number to another destination, and to a PDF. Your intended change of the behaviour would then result in an invalid PDF, as some destinations must be object based and not number based. (It still works properly with Adobe Reader, but fails PDF/A-1b checks) was (Author: tilman): I haven't understood the 2nd part of your argument "Only someone interested in COS would do that..."? The problem that getPageNumber() solves is just what's in the javadoc. It returns a "pure" page number, if there is one and -1 if there isn't a page number. > PDPageDestination page index off by one > --------------------------------------- > > Key: PDFBOX-2786 > URL: https://issues.apache.org/jira/browse/PDFBOX-2786 > Project: PDFBox > Issue Type: Bug > Components: PDModel > Affects Versions: 1.8.9, 2.0.0 > Reporter: Johanneke Lamberink > Assignee: Tilman Hausherr > Fix For: 1.8.10, 2.0.0 > > Attachments: Archive.zip > > > When creating a new bookmark with the same page number as an existing > bookmark, the resulting destination is offset by 1 compared to the old > destination. > This results in the bookmark being set for the next page, which could be a > non-existing page. > I've added a class with an example pdf and my own output pdf. Run with > argument of a path to where you have the pdf, including a trailing slash. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org