SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2008
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Link to certain page in PDF doc

    If you create an HTML link to another HTML page, you can link to a particular place on that page by using an anchor. In this case, I will be linking to a 16-page PDF. When users open the link in IE 6 or Firefox 3, the browser opens it for them and they can view it in the browser.

    Of course, this opens the file up in Page 1. Is there a way to code the link so that it opens the PDF file to, say, page 7?

  2. #2
    SitePoint Guru
    Join Date
    Jan 2007
    Posts
    934
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No

  3. #3
    SitePoint Enthusiast Web Design Perth's Avatar
    Join Date
    Sep 2008
    Location
    Perth, Western Australia
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Out of interest, why do you need to do this?

  4. #4
    SitePoint Enthusiast
    Join Date
    Aug 2008
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Web Design Perth View Post
    Out of interest, why do you need to do this?
    I am working on an Intranet at a large company, and we have an online magazine for employees. The boss of a certain department wanted to link to a certain article from his department's home page.

  5. #5
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The best thing to do if you're going to link to the article is to put a Web page version of the article on the site. Failing that, extract the article from the PDF and create a separate PDF file for that article.

  6. #6
    SitePoint Member
    Join Date
    Oct 2008
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does linking to filename.pdf#page=7
    not work?

  7. #7
    SitePoint Wizard bronze trophy Black Max's Avatar
    Join Date
    Apr 2007
    Posts
    4,029
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by zhittle View Post
    Does linking to filename.pdf#page=7
    not work?
    No, because a PDF file does not operate under HTML parameters. Adobe Reader (or FoxIt, or whatever PDF reader you use), opens PDF files in a separate window of your browser (or standalone). PDF and HTML files are apples and oranges.

  8. #8
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,598
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    There is a way to do it provided that you are running a recent version of Acrobat and have defined the appropriate points in the document where you want to open to. I can't remember the exact details as I was investigating how to do it about a year ago and the version of Acrobat that we had available was 6 and the earliest version to support this was 7. The terminology is somewhat different from the web terminology for the same thing but if you search the Acrobat help you should be able to find the instructions on how to set it up.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  9. #9
    SitePoint Wizard bronze trophy Black Max's Avatar
    Join Date
    Apr 2007
    Posts
    4,029
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Stephen, this is interesting and potentially quite useful...though all the users with versions of Acrobat earlier than 7, and non-Adobe users, would be left behind.

  10. #10
    SitePoint Zealot Acquiesce's Avatar
    Join Date
    Feb 2007
    Location
    Reading, England
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    There is a way to do it provided that you are running a recent version of Acrobat and have defined the appropriate points in the document where you want to open to. I can't remember the exact details as I was investigating how to do it about a year ago and the version of Acrobat that we had available was 6 and the earliest version to support this was 7. The terminology is somewhat different from the web terminology for the same thing but if you search the Acrobat help you should be able to find the instructions on how to set it up.
    Here it is for anyone interested:

    Link from an HTML page to a specific page in PDF file .

    Looks fairly standard from what I can see, very similar technique to using named anchors in HTML files. Useful to know though.

    Only works for Acrobat 7x, so I presume any versions prior to this will just default to the 1st page... can't confirm this though.

  11. #11
    SitePoint Enthusiast wildsue's Avatar
    Join Date
    Oct 2003
    Location
    Switzerland
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi!
    It would work, if the pdf document would be opened within the browser. I tested this method some time ago. But today most browsers open the pdf's with acrobat reader - and there ends the power of our html ;-)

    Greetings!

    Susanne
    SUTANET Webpublishing
    Susanne Tanner Ruppe
    Professional Webdesign from Switzerland since 2003!
    www.sutanet.ch - kontakt@sutanet.ch

  12. #12
    SitePoint Addict
    Join Date
    Jul 2004
    Location
    Colorado, USA
    Posts
    370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wildsue View Post
    Hi!
    It would work, if the pdf document would be opened within the browser. I tested this method some time ago. But today most browsers open the pdf's with acrobat reader - and there ends the power of our html ;-)

    Greetings!

    Susanne
    Does this hold true even if you follow the linking instructions direct from Adobe? (Linked above my Acquiesce.)
    Terri Eades - Web/Graphic Designer - www.terrieades.com

  13. #13
    SitePoint Enthusiast wildsue's Avatar
    Join Date
    Oct 2003
    Location
    Switzerland
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Perfectionist121!
    Your right, unfortunately the new browsers doesn't listen anymore to that commands.
    It's really a good time ago that I tested these functions, they worked all (page, pagemode, toolbar and so on). But now... :-(
    But I didn't try out the anchor like described by Adobe. Did anyone else?

    Susanne
    SUTANET Webpublishing
    Susanne Tanner Ruppe
    Professional Webdesign from Switzerland since 2003!
    www.sutanet.ch - kontakt@sutanet.ch


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •