Hi,

I created an application (on Windows XP) that outputs PDF file. While it can 
output the file when I run it under Eclipse environment, it does not create the 
file when I double click the jar to run the same. Basically I am writing this 
PDF file as C:\temp\somefile.pdf.

Please advice what I could be missing. (Also pls see related code snippet 
below).

Thanks a lot in advance!

Regards
Raj


The code snippet is as follows:

public class PdfCreator {
    /**
     * Generates a PDF file with the text 'Hello World'
     * 
     * @param args no arguments needed here
     */

    Document doc;
    PdfPTable table;
    Font font;

    public static PdfCreator getInstance(String filename) {
        return (new PdfCreator(filename));
    }

    public PdfCreator(String filename) {
        doc = new Document();
        try {
            PdfWriter.getInstance(doc,
                    new FileOutputStream(filename));
            doc.open();
        } catch (DocumentException de) {
            System.err.println(de.getMessage());
        } catch (IOException ioe) {
            System.err.println(ioe.getMessage());
        }

        table = null;
        font = null;
    }
 
  ....






       
____________________________________________________________________________________Take
 the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to