1.

Solve : Batch file - Open PDF and Display at 100%?

Answer»

Hi everyone. Please forgive my IGNORANCE with Batch files but...

I want to create a very simple Batch file that 1) opens a PDF Adobe Reader and 2) set the zoom level of the PDF to 100%. Here's what I am using now:

start your_important_document.pdf

This simple one-LINE script seems to takes care of task #1 just fine... but how do I accomplish #2? This doc might help
www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters.pdfThanks very much for the document link. What would the syntax be for using the "zoom" command in a batch file? (Please forgive my ignorance. Batch files are new to me. I'm using it to open a PDF VIA a button click in a Flash Application.)Have a look on page 5.I see it... I just can't make it work. (When I say I'm a neophyte, sadly I'm not just kidding around. I'm a Flash/Actionscript guy quickly thrust into this Batch file world. My apologies.)

The Adobe document shows this as an example:

Acrobat.exe /A "zoom=100" "my_document.pdf"

but it won't work for me. I'm sure my syntax is off...

Try the command:

start "" "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe /a "zoom=100" "path\to\file.pdf"

Adjust the path for Adobe if necessary.I get an error message saying it can't FIND the file. (I've double checked the path and names very carefully, and they are correct.)

In any case, this opens a bigger can of worms. My Flash application will be distributed on a USB drive to users with different versions of different operating systems, so identifying a specific path and application name within the batch file isn't an option, I don't think.

My original "start my_document.pdf" line (without specifying opening Adobe Reader) worked everywhere I tested it. Is there a different solution I'm not seeing?

In any case, thanks so much for your help...Quote

Acrobat.exe /A "zoom=100" "my_document.pdf"
Don't leave just yeat.
Somebody will show up and WRITE a model for you.
Thee tow things to resolve.
1. The name and path of the Adobe reader.
2. The name and path of the PD file you want to show

Are the PDF files always in the same area?
Code: [Select]C:\>type 2pdfdos.bat

copy c:\readiris\readiris.pdf "C:\Program Files\Adobe\Reader 9.0\Reader\"

cd "C:\Program Files\Adobe\Reader 9.0\Reader\"

Acrord32.exe /A "zoom=100" "readiris.pdf"C:\>



Output:

C:\>2pdfdos.bat

C:\>copy c:\readiris\readiris.pdf "C:\Program Files\Adobe\Reader 9.0\Reader\"
1 file(s) copied.

C:\>cd "C:\Program Files\Adobe\Reader 9.0\Reader\"

C:\Program Files\Adobe\Reader 9.0\Reader>Acrord32.exe /A "zoom=100" "readiris.pdf"

C:\Program Files\Adobe\Reader 9.0\Reader>

http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/
intro_to_sdk/DeveloperFAQ.pdf#page=27

Quote
<<<<"
All the following information from the above document. )

How Do I Use Command Lines with Acrobat and Adobe Reader on Windows?

These are unsupported command lines, but have worked for some developers. There is no documentation for these commands other than what is listed below. You can display and print a PDF file with Acrobat and Adobe Reader from the command line.

NOTE:All examples below use Adobe Reader, but apply to Acrobat as well. If you are using Acrobat, substitute Acrobat.exe in place of AcroRd32.exe on the command line.AcroRd32.exe pathname — Executes Adobe Reader and displays the file, whose full path must be provided.

Other options for the command line are:
AcroRd32.exe /p pathname — Executes Adobe Reader and displays the Print dialog box.
AcroRd32.exe /t path "printername" "drivername" "portname" — Initiates Adobe Reader and prints a file, whose path must be fully specified, while suppressing the Print dialog box.

The four parameters of the /t option evaluate to path, printername, drivername, and portname (all
strings).
●printername — The name of your printer.
●drivername — Your printer driver’s name, as it appears in your printer’s properties.
●portname — The printer’s port. portname cannot contain any "/" characters; if it


Discussion

No Comment Found