org.simoes.lpd.util
Class PrintUtil

java.lang.Object
  |
  +--org.simoes.lpd.util.PrintUtil

public class PrintUtil
extends java.lang.Object

This is a utility class to help us print labels.


Constructor Summary
PrintUtil()
           
 
Method Summary
 void printPDF(byte[] data, java.lang.String printer)
          This version takes the byte[] passed in and creates a temporary file.
 void printPDF(java.io.File filename, java.lang.String printer)
          Executes command "cmd /c AcroRd32.exe /t c:\some\file\name.txt printerName".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintUtil

public PrintUtil()
Method Detail

printPDF

public void printPDF(java.io.File filename,
                     java.lang.String printer)
              throws LPDException
Executes command "cmd /c AcroRd32.exe /t c:\some\file\name.txt printerName". This method blocks until the command completes.

Parameters:
filename - - A File representing the pdf we want to print.
printer - - Printer to send PDF to, if this is null use default printer
LPDException

printPDF

public void printPDF(byte[] data,
                     java.lang.String printer)
              throws LPDException
This version takes the byte[] passed in and creates a temporary file. It then calls the printPDF() above

LPDException