Will66 Posted October 28, 2009 Share Posted October 28, 2009 (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=FitBHow 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 October 28, 2009 by Will66 Link to comment Share on other sites More sharing options...
bo8ster Posted October 28, 2009 Share Posted October 28, 2009 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] Link to comment Share on other sites More sharing options...
Will66 Posted October 28, 2009 Author Share Posted October 28, 2009 (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 October 28, 2009 by Will66 Link to comment Share on other sites More sharing options...
bo8ster Posted October 28, 2009 Share Posted October 28, 2009 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] Link to comment Share on other sites More sharing options...
Will66 Posted October 28, 2009 Author Share Posted October 28, 2009 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"') Link to comment Share on other sites More sharing options...
bo8ster Posted October 28, 2009 Share Posted October 28, 2009 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] Link to comment Share on other sites More sharing options...
Will66 Posted October 28, 2009 Author Share Posted October 28, 2009 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"') Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now