i am tring to add an PdfAction o DOCUMENT_CLOSE

this is my snipplet:

public static void main(String[] args) {

        System.out.println("Hello World");

        // step 1: creation of a document-object
        Document document = new Document();
        try {
            // step 2:
            // we create a writer that listens to the document
            // and directs a PDF-stream to a file
            PdfWriter pdfWriter =  PdfWriter.getInstance(document,
                    new FileOutputStream("C:\\HelloWorld.pdf"));

            // step 3: we open the document
            document.open();
            // step 4: we add a paragraph to the document
            document.add(new Paragraph("Hello World"));
            PdfAction pdfAction = new PdfAction("http://www.xxxyyyttt.it";);
            pdfWriter.setAdditionalAction(PdfWriter.DOCUMENT_CLOSE, 
pdfAction);
        } catch (DocumentException de) {
            System.err.println(de.getMessage());
        } catch (IOException ioe) {
            System.err.println(ioe.getMessage());
        }

        // step 5: we close the document
        document.close();
    }

but it seem not working, whta you think i am doing wrong?
 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Problemi di Liquidità? Con Logos Finanziaria 30.000 € in 24 ore a dipendenti e 
lavoratori autonomi con rimborsi fino a 120 mesi clicca qui
* 
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2907&d=20-7

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to