Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jumping to a specific section of a pdf from a web link 1

Status
Not open for further replies.

Stretchwickster

Programmer
Apr 30, 2001
1,746
GB
Hi,

I have a pdf that has bookmarks already included (i.e. you can jump from the contents to the specific section). This pdf lives on my web server and I provide a link to the pdf from a webpage. Ideally, what I'd like to do is open the pdf at a particular section from an anchor on a webpage. Is there any way to do this?

Any clues or hints would be much appreciated!

Clive [infinity]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
I don’t recall any other scenario except to split it into multiple PDF’s, and leave a copy of the entire PDF if you want a link for that also.

For instance: I have clicked into certain pages of PDF's via WebPages, but I don’t recall ever being able to go up in the PDF from where I originally clicked. So the author had obviously split the original PDF into chapters, with links to each chapter, or a link to the entire PDF. But, I don’t know if what you want to do is possible.

I would like to know for sure also though. If anyone has ever clicked into the middle of a PDF via a webpage, and gone UP in the PDF's structure, please comment.
 
I just thought of another way to accomplish your goal.

Lets say you have 10 web anchors to 10 different pages of the same PDF.
What you could do is save 10 different copies of the PDF, but change the properties of each copy so that the “initial view” setting opens to the appropriate page.

So PDF-a.1 would have the properties of opening to page 1.
PDF-a.2 would open to page 2 upon initial view...etc...

These settings are in acrobat pro under:
file/ document properties/ initial view/ page number X

There may be a more efficient way, but that would work, and they could go up in the PDF structure.
 
My first attempt was to use:
Code:
<a href="docs/Manual.pdf#page=50">section 3.5.1</a>
And guess what?
...it worked like a dream. I had extensively googled and had not been able to find anything like this, so thank you bkrike - it has saved me quite a bit of work and has further improved a user experience of a web interface (I hope!). Many thanks!

Clive [infinity]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
I tell you what bkrike, it might be worth adding this as an FAQ to this forum as I'm not sure very many people know about it (judging by the lack of google results).

I did a google search in hindsight and came up with the following site which gives a number of parameters that can be included in an HTML anchor tag:

Clive [infinity]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top