How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Jason Fenoglio Your Own Question

Jason Fenoglio
Jason Fenoglio, Sr. Systems Engineer
Category: Software
Satisfied Customers: 266
Experience:  Sr. Systems Engineer
94203781
Type Your Software Question Here...
Jason Fenoglio is online now
A new question is answered every 9 seconds

I have Adobe Acrobat XI Standard and want to know how to

Customer Question

I have Adobe Acrobat XI Standard and want to know how to develop or schedule a batch file to print a network folder of PDF to a network printer.
Submitted: 5 months ago.
Category: Software
Expert:  Jason Fenoglio replied 5 months ago.

Hi my name is ***** ***** I may be able to assist. Are you just saving the PDFs manually to a share then you want the PDFs to print to a printer based on a scheduled task? What is the make and model of the network printer that you are tying to send the PDFs to?

Customer: replied 5 months ago.
I have several people saving pdf file to a network folder and I want to run a batch file that will select all the PDF and print them to a network printer in a different office.
Expert:  Jason Fenoglio replied 5 months ago.

Ok, let me work something up for you test. It might be a little while before my response so bare with me. Is it OK if after the PDF is printed, the file is then moved to another folder in the same directory called "Printed" or something along those lines?

Customer: replied 5 months ago.
Expert:  Jason Fenoglio replied 5 months ago.

Ok great! Give me a few minutes and I'll get back to you.

Customer: replied 5 months ago.
Thanks
Expert:  Jason Fenoglio replied 5 months ago.

Ok, this should get you going. I would highly recommend running this on the server where the share is hosted to you can use the local path to the folder. If you are using a network path, Windows 7 or higher blocks the ability to mount a network path through the command line and you have to set a reg key to bypass that protection.

Make sure you set the variables to your environment and add a "Printed" folder to the directory containing the PDFs.

set DOCFullPath= The path to the PDF files.
set Acrobat="C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" - Make sure that this path matches your version and change accordingly.
Printer= "The full name of the printer you want the PDFs to print to"

Here is the contents of the batch file. Save it into a file called printPDF.bat or something familiar to you.

You'll then create a Scheduled Task where the .bat file resides to run at the times you specify.

==============================================================

@echo off

REM Define paths and settings for script
set DOCFullPath=C:\PDF
set Acrobat="C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe"
set Printer=4730

REM Process all files within the folder that have not already been processed
for /F "tokens=*" %%1 IN ('dir /a-d /b "%DOCFullPath%\*"') do (

REM End the PDF print program
start cmd /c "timeout 3 & taskkill /f /im acrord32.exe"

REM Print document
%Acrobat% /n /s /o /h /t "%DOCFullPath%\%%1" "%Printer%"

REM Rename file to indicate processed
move "%DOCFullPath%\%%1" "%DOCFullPath%\Printed\%%1"

)

EXIT

====================================================

Expert:  Jason Fenoglio replied 5 months ago.

Let me know if you have any more questions. Also, when your are ready to accept my answer, please rate my service with a positive rating of 3 or better with the rating system below.

Thanks,

Jason

Customer: replied 5 months ago.
I will test this later this week and if it doesn't work how do I contact you to fix it?
Customer: replied 5 months ago.
Review your batch file did you leave off some code because you have an open Parentheses after do and a ending one just before Exit. Please clarify.
Expert:  Jason Fenoglio replied 5 months ago.

The open parenthesis is right after the DO command higher in the script.

You can just reply to this question with any of the e-mails you've received from JustAnswer.com. I'll see it come up in my queue if you have my questions pertaining to this issue.

Customer: replied 5 months ago.
Hi Jason,We are in the midst of complaince and I can't test and rate you until after next week. I will follow up with you once I utilize your batch file.
Regards,
Ervin
Expert:  Jason Fenoglio replied 5 months ago.

Thanks for the update. Take your time and I'll be here to answer any questions.

Thanks,

Jason

Expert:  Jason Fenoglio replied 5 months ago.

Just checking in to see if the batch script worked for you.