sumatrapdf icon indicating copy to clipboard operation
sumatrapdf copied to clipboard

Open PDF to a specific bookmarked page

Open GitHubRulesOK opened this issue 5 years ago • 3 comments

from https://forum.sumatrapdfreader.org/t/open-pdf-to-a-specific-bookmarked-page/3090

As far as I know SumatraPDF has always been immune to some common means to exploit a PDF since PDF specification allows documents to automatically run code. /JS or /JavaScript /Action or /AA (Automatic Action) /Launch Action /OpenAction (which for example can be directed to a malicious site)

However that last directive can be very commonly found used to open a PDF at a given page, such as page 2 in this sample. forum 3090 BkMkTest.pdf

What is desired is that in a safe way SumatraPDF follow the /OpenAction directive to only open page 2 (on first opening the file in a sesion), but not be hijacked to Open any other object such as an URI.

The action could be an OPTION thus maintain default condition (as per current behaviour) to NOT open at "given" pages

later edit removed references to historic .v/bkm behaviour

GitHubRulesOK avatar Jun 20 '20 14:06 GitHubRulesOK

Seems to be working i.e. clicking on Page 2, Page 3 links in bookmarks goes to page 2 and 3. Unless it's about something else.

kjk avatar May 04 '24 23:05 kjk

The issue is on opening the file it should be forced to GO TO page 2 (highlighting bookmark 2) same as Acrobat does

GitHubRulesOK avatar May 05 '24 01:05 GitHubRulesOK

Thanks, I understand now.

kjk avatar May 05 '24 12:05 kjk