For whatever reason, sometimes adobe likes to be a stage 5 clinger. = C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" Print all PDFs from a defined directory:Ĭopy Code // Define location of adobe reader/command line switches to launch adobe in "print" mode.I know it could be easily incorporated into any GUI based desktop application as well. The code below is used in a console application. Attempting to send a post script straight to the printer can get nasty/complicated so this is meant to be an easy solution on how to take a newly created PDF/existing PDF from your app and send it directly to the printer. BackgroundĪfter reviewing some of Adobe's documentation on command line switches, I was able to throw together a bit of code that would send a PDF straight to the printer without any user interaction. This tip is merely to show a way in which you can launch Adobe and send a PDF straight to the printer in one fail swoop without using a third party solution (PdfSharp/iTextSharp.etc.).
0 Comments
Leave a Reply. |