0

I want to find a file in a folder, find a specific bookmark in that file, and when the right information is entered (for example "file 7, bookmark 5") the file will open to the right spot. (in python)

I've found this:

path_to_pdf = os.path.abspath(filename)

path_to_acrobat = os.path.abspath('C:\Program Files (x86)\Adobe\Acrobat 10.0\Acrobat\Acrobat.exe')

process = subprocess.Popen([path_to_acrobat, '/A', 'page=' + page, path_to_pdf], shell=False, stdout=subprocess.PIPE)
process.wait()

but it only finds pages, not bookmarks

there seems to be a way to do this with pyPdf2 but I can't find documentation

user3084455
  • 706
  • 6
  • 9
  • Please show what you have already found or what you have tried so far. – Christian Tapia Dec 28 '13 at 22:46
  • If I remember correctly, you can use something like `acrobat.exe foo.pdf#bookmark`. Obviously, you need the name of the bookmark, there’s not much point in jumping to the fifth one – which way do you count them, chronologically? – Christopher Creutzig Dec 29 '13 at 09:52
  • yes, "bookmark 5" was a poor example, think of "chapter 5" or whatever, how exactly would I use this code? – user3084455 Dec 29 '13 at 10:08

0 Answers0