You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "John Hewson (JIRA)" <ji...@apache.org> on 2014/10/10 23:48:33 UTC

[jira] [Commented] (PDFBOX-248) Document outline landscape pages missing

    [ https://issues.apache.org/jira/browse/PDFBOX-248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14167584#comment-14167584 ] 

John Hewson commented on PDFBOX-248:
------------------------------------

Does anybody know if this is still an issue?

> Document outline landscape pages missing
> ----------------------------------------
>
>                 Key: PDFBOX-248
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-248
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 0.7.3
>            Priority: Minor
>             Fix For: 2.0.0
>
>
> [imported from SourceForge]
> http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1663446
> Originally submitted by pbeichert on 2007-02-19 04:55.
> I create an index which contains all pdf-bookmarks and the corrensponding pages of the bookmarks. This works fine when all pages are in portrait. As soon as one page inbetween is in landscape mode, the returned page number is null.
> The result is the same with PDFBox 0.7.3 and with PDFBox-0.7.4-dev.
> Here is the code I use:
> //first map all pages to the page number:
> List allPages =doc.getDocumentCatalog().getAllPages(); 
> HashMap<Object, Integer> page2PageNumber = new HashMap<Object, Integer>(); 
> for (int i=0;i<allPages.size();i++) 
> { 
>  page2PageNumber.put(allPages.get(i), new Integer(i+1));
> }
> PDDocumentOutline bookmark = doc.getDocumentCatalog().getDocumentOutline();
> PDOutlineItem current = bookmark.getFirstChild();
> // now iterate through the bookmarks
> ...
> System.out.println("Page Nr: " + current.page2PageNumber.get(current.findDestinationPage(doc))
> + " Title = " current.getTitle());



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)