|
Hi, i'm pretty new to java and mostly to itext, so excuse if my
question is obvious for you, but i need to add destination to a pdf
created with pdfstamper; this is my code, (taken from internet, maybe from your site) document = new Document(); copy = new PdfCopy(document, new FileOutputStream("newPdfFromTemplate.pdf")) document.open(); // // Acquisizione Moduli del Pdf Iniziale // reader = new PdfReader("Template.pdf"); baos = new ByteArrayOutputStream(); stamper = new PdfStamper(reader, baos); form = stamper.getAcroFields(); // // Impostazione Primo Valore Letto // form.setField("FIELD", "DATA"); stamper.setFormFlattening(true); stamper.close(); // reader = new PdfReader(baos.toByteArray()); copy.addPage(copy.getImportedPage(reader, 1)); // I tried to add PdfContentByte under; under = stamper.getWriter().getDirectContent(); PdfDestination de = new PdfDestination(PdfDestination.FITR, 0, 0, 0, 0); PdfOutline level1 = new PdfOutline(under.getRootOutline(), de, "test"); in several ways, but i always get null pointer exception. Someone could Help me? Thanks --
Giovanni Meazza _________________________________________________________________
Tel. + 39 0331 245811 - Fax: + 39 0331 1986857 Cell.. + 39 338 2590558 Email: [EMAIL PROTECTED] Skype: meazzagiovanni ________________________________________________________________ Il
testo e gli eventuali documenti trasmessi
contengono informazioni riservate al destinatario indicato. Questa
e-mail è confidenziale e la sua riservatezza è tutelata legalmente
dalla legge 196/2003. |
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ 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/
