Zubrag.com
February 03, 2012, 08:21:31 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Opening a pdf file and point to "blablabla.pdf#part1" ?  (Read 1864 times)
Hugues
Newbie
*
Posts: 1


« on: July 31, 2009, 02:04:50 pm »

Thanks for this script, it works great.
My PDF files have anchors in them, and I would like my users to be able to open protected PDFs to a specific place. It works perflectly fine when I directly access to the file (blablabla.pdf#part1), but I can't find a way to keep the anchor information and pass it through your script. I thought I could send the anchor data (=part1) through a header, but...
Any idea?
Thanks again,

Hugues

Logged
mtg
Newbie
*
Posts: 15


« Reply #1 on: August 03, 2009, 07:59:58 am »

Bookmarks won't work if your script is using a UNC path. Read the note here:
http://kb2.adobe.com/cps/317/317300.html

You have to set a destination for it to work with UNC paths. Also, you would have to change the header to automatically open the file instead of prompting for open/save:

Change:
Code:
header("Content-Disposition: attachment; filename=\"$asfname\"");

To this:
Code:
header("Content-Disposition: filename=\"$asfname\"");

I tried it out and it worked fine for me. A bookmark anchor did not work, but adding a destination did. The file would be called like download.php?f=filename.pdf#destinationname


Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC