Print a PDFTag(s): IO Open Source
[Windows only]
You can launch the Acrobat Reader to print a PDF to the default printer.
More infos the "unsupported" command-line switches for the Acrobat reader :
import java.io.IOException; public class PdfUtils { static final String WIN_COMSPEC = System.getenv("comspec"); static final String WIN_ACROBAT = "acrord32.exe"; public static void print(String pdf) throws IOException { String[] commands = {WIN_COMSPEC, "/c", "start", WIN_ACROBAT, "/t", "/h", pdf }; Runtime.getRuntime().exec(commands); } public static void main(String[] args) throws IOException { PdfUtils.print("c:/users/public/temp/test.pdf"); } }
You can use a special wrapper to force the closing the Acrobat Reader after the print operation. See http://www.biopdf.com/acrowrap/close_adobe_reader.php (acrowrap.exe).