I'm trying to open a PDF to a specific bookmark using python.
So far, I'm able to run the following command in Command Prompt and get exactly what I want (last is the name of a named destination inside the PDF test.pdf)
"C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /A "nameddest=last" "C:\Users\User\Desktop\test.pdf"
But when I go to Python and try using the subprocess module like this:
import subprocess
subprocess.call(['"C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /A "nameddest=last" "C:\\Users\\User\Desktop\test.pdf"'], shell=True)
I get "The filename, directory name, or volume label syntax is incorrect." Something I tried before this caused Adobe Reader to open, but give me a dialog box that had the same message
Why does what happens changes when I run it in python? And how can I fix it?
I'm running Anaconda 2.1.0 on Windows 8 and using Acrobat 10 to create Destinations. I've played around with python for 2-3 years, but don't know much more than someone with 1 semester of an intro programming class.