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/11 00:15:33 UTC

[jira] [Closed] (PDFBOX-140) OtlineItem findDestinationPage not working with AJS

     [ https://issues.apache.org/jira/browse/PDFBOX-140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Hewson closed PDFBOX-140.
------------------------------
    Resolution: Cannot Reproduce

That's great, but we need a sample PDF.

> OtlineItem findDestinationPage not working with AJS
> ---------------------------------------------------
>
>                 Key: PDFBOX-140
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-140
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>
> [imported from SourceForge]
> http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1441065
> Originally submitted by rbri on 2006-03-01 08:41.
> I have a document here where the Outline is based on 
> JavaScript actions. A samle action JS looks like 
> 'this.pageNum = 0; this.scroll(0, 880);'.
> PDFBox is able to parse the outline. But the call 
> firstItem.findDestinationPage(document); fails. PDF Box 
> is not able to understand the Javascript in the page.
> I have enhanced the class PDActionJavaScript a bit with 
> a small 'parser' that is able to find assigments like
> "this.pageNum = 10"
> "pageNum=11"
> "pageNum=23a11"
> "this.pageNum               =    12;pageNum=a11"
> " this.pageNum = 7; scroll(4, 5);"
> With this small fix, PDFBox is able to jump to the 
> right page.
> The whole source is in the attachment.
> I have also written a small JavaScript mocker based on 
> Rhino. If you interested in this drop me a note.
> Sorry, but i can't provide a sample document.
> [attachment on SourceForge]
> http://sourceforge.net/tracker/download.php?group_id=78314&atid=552832&aid=1441065&file_id=169330
> PDFBox.zip (application/zip), 5570 bytes
> Patch



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