Jump to content

Recommended Posts

Posted (edited)

Web Browsers can open a pdf with paramaters like this:

file:///D:/WillsAutoit/April.pdf#toolbar=0&navpanes=0&scrollbar=0&page=4&view=FitB

How can i open a PDF directly with Acrobat using paramaters Run or Shell please?

When opening a PDF document from a command shell, you can pass the parameters to the open command using the /A switch with the following syntax:

<Acrobat path> /A "<parameter>=<value>" "<PDF path>"

For example:

Acrobat.exe /A "zoom=1000" "C:\example.pdf"

Edited by Will66
Posted

What have you tried so far?

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Posted (edited)

ShellExecuteWait(@ScriptDir & "\April.pdf", "#page=4")

;ShellExecute("AcroRd32.exe /A zoom=1000 " & @ScriptDir & "\April.pdf")

;ShellExecute("AcroRd32.exe /A 'page=5' '" & @ScriptDir & "\April.pdf'")

http://www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters_v9.pdf#search=

Edited by Will66
Posted

ShellExecute('AcroRd32.exe', '"C:\Documents and Settings\<path>\pdf_open_parameters_v9.pdf"')
works. /a is optional, only need for parameters.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Posted

ShellExecute('AcroRd32.exe', '"C:\Documents and Settings\<path>\pdf_open_parameters_v9.pdf"')
works. /a is optional, only need for parameters.

Thanx, but i cannot get it to work with parameters....error msg...there was an error opening the file:

ShellExecute('AcroRd32.exe', '"D:\WillsAutoit\pdftohtml-0.38-win32\April.pdf page=4"')
Posted

It seems its different for URLs then local files. Anyway this works:

ShellExecute('AcroRd32.exe', ' /A "page=6" "C:\Documents and Settings\<path>\My Documents\pdf_open_parameters_v9.pdf"')

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Posted

It seems its different for URLs then local files. Anyway this works:

ShellExecute('AcroRd32.exe', ' /A "page=6" "C:\Documents and Settings\<path>\My Documents\pdf_open_parameters_v9.pdf"')

Thanx bo8ster, seperate paramaters with ampersand operator:

ShellExecute('AcroRd32.exe', ' /A "toolbar=0&navpanes=0&scrollbar=0&page=4&view=FitB" "D:\WillsAutoit\pdftohtml-0.38-win32\April.pdf"')

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...