Re: Opening PDF at specified page
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Opening PDF at specified page

From: Andrew Poulos <ap_prog@hotmail.com>
Date: Wed Apr 26 2006 - 05:23:29 CEST

> But reviewing your code a second time, this line could be a problem:
>
> newPDF = window.open(url+"#pagemode=bookmarks&page="+page,
>
> Either "&page="+page is part of the query component of the URI, or it is
> part of its fragment component (since you want to show a specific page of
> the PDF document, the latter is more likely). If the former, it must be
> placed before the first "#" (but after the first "?") and can be used as
> is (provided that `page' is a decimal number); if the latter, it must be
> placed after the first "#" and must be encoded with encodeURIComponent(),
> especially the "&". See also RFC3986 "Uniform Resource Identifier (URI):
> Generic Syntax", section 3 et seqq.
>

I tried a number of possible permutations with no success. I'm running
out of time so I converted the PDF to HTML and used anchors. This will
give me more time to play with it before the next PDF I have to try to
link to.

Additionally, page 8 of this doc:
<url:
http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf
>
gives examples one of which matches my usage.

This page:
<url: http://www.adobe.com/support/techdocs/317300.html >
says "If you use URLs other than HTTP and HTTPS, such as server
locations (\\servername\folder), then set the link to open to a set
destination using the procedure in the following section" but I don't
quite understand it. Do they mean that other than HTTP of HTTPS you
should use destinations rather than page numbers?

Andrew Poulos
Received on Mon May 1 05:21:10 2006