Holger's
Java API

com.antelmann.util
Class PDFUtils

java.lang.Object
  extended by com.antelmann.util.PDFUtils
All Implemented Interfaces:
ThirdParty

public class PDFUtils
extends Object
implements ThirdParty


Method Summary
static void generatePDF(String text, File file)
          uses the IText package from lowagie.com
static void printAsPDF(String text)
          creates a temp file and then uses a system call to print it
static boolean printPDF(File pdfFile)
          platform dependent system call to print the given file to the default printer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

printAsPDF

public static void printAsPDF(String text)
                       throws IOException,
                              PrintException
creates a temp file and then uses a system call to print it

Throws:
IOException
PrintException
See Also:
printPDF(File)

printPDF

public static boolean printPDF(File pdfFile)
                        throws IOException
platform dependent system call to print the given file to the default printer. Method uses application.pdfPrintCommand from the Settings. The switches used for the AcroRd32.exe are "/p /h".

Throws:
IOException
See Also:
Settings.getProperties()

generatePDF

public static void generatePDF(String text,
                               File file)
                        throws IOException,
                               PrintException
uses the IText package from lowagie.com

Throws:
IOException
PrintException


(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads