links · people · groups · tags | My: links · tags · groups · watchlists · notes login · sign up now! | help · blog
Simpy simpy
 
raidho, member since Aug 24, 2006
.
Search Everyone: "print",

Top "print" experts: ggth, scrunda, econsultant, nbr, pkeane, owenskie,

Groups about "print": Printing, canvas photo prints, photo print papers, Gift Packaging and Print, digital, Aditya patel,

1 - 4 of 4   Watch raidho
 
by raidho 2007-03-14 09:02 print · batch · pdf
http://www.print-conductor.com/download_pc.htm - cached - mail it - history
/* * PDFPrintLibClass.java * * Created on January 27, 2006, 10:28 AM * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */ package org.me.pdfprint; /** * * @author mgosselin */ public class PDFPrintLibClass { /******************************************************************************************** * * printPDF * * Prints a PDF using Adobe Reader "/t" (print and terminate) * * @param File File to be printed, for example, C:\MYFILE.PDF * @param Printer Printer, for example, \\MYSERVER\MYPRINTER * **********************************************************************************************/ public static void printPDF(String pFile, String pPrinter) { final String PATH_ADOBE_READER = "C:\\Program Files\\Adobe\\Acrobat 7.0\\Reader\\AcroRd32.exe"; final String ADOBE_READER_PRINT_COMMAND = "/t"; final String SLASH = "/"; final String QUOTE = "\""; final String SPACE = " "; // Command to be executed String lCommand = QUOTE + PATH_ADOBE_READER + QUOTE + SPACE + ADOBE_READER_PRINT_COMMAND + SPACE + QUOTE + pFile + QUOTE + SPACE + QUOTE + pPrinter + QUOTE; System.out.println("[printPDF] Command to be executed : " + lCommand); Process lAdobeBackGroundProcess = null; Process lAdobeProcess = null; try { // Must create a background Adobe Reader process (don't ask why, just do it;-) lAdobeBackGroundProcess = Runtime.getRuntime().exec(PATH_ADOBE_READER); // Execute the Adobe Reader command "/t" (print and terminate) lAdobeProcess = Runtime.getRuntime().exec(lCommand); // Wait for Adobe Reader to complete int exitVal = lAdobeProcess.waitFor(); if ( exitVal != 0 ) { throw new Exception("[printPDF] Adobe Reader process exitVal : " + exitVal); } } catch (Exception e) { System.err.println("[printPDF] Error printing PDF : " + pFile); e.printStackTrace(); } finally { if (lAdobeBackGroundProcess != null) { lAdobeBackGroundProcess.destroy(); lAdobeBackGroundProcess = null; } } } /** Creates a new instance of PDFPrintLibClass */ public PDFPrintLibClass() { } }
by raidho 2007-03-14 07:11 pdf · print · java
http://forum.java.sun.com/thread.jspa?threadID=293692&start=45&tstart=0 - cached - mail it - history
by raidho 2006-10-05 03:28 dos · print · directory content
http://articles.techrepublic.com.com/5100-1035_11-5035179.html - cached - mail it - history
1 - 4 of 4  
Related Tags
 
- exclude ~ optional + require
Add Dates