Catch the document.close() exception to see what I mean. If you just
want to change the info use PdfStamper:
PdfStamper stp = new PdfStamper(...);
HashMap info = new HashMap();
info.put("Title", "Stampa Fatture 3.3");
info.put("Subject", "Stampa Fatture 3.3");
info.put("Author", "Liscor S.p.A");
stp.setMoreInfo(info);
stp.close();
> -----Original Message-----
> From: Andrea De Paoli [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 11, 2005 11:17 AM
> To: Paulo Soares
> Cc: Liscor - Davide Valente; Liscor - Giuseppe Polo
> Subject: Re: Problem
>
> Hi Paulo,
> thanks for your response..but I don't understand..
> What kind of content should I add?..I have already read the
> pdf document and I want add only some new information..How
> can I do it?..Can you write a small examples or modify my code?
> Thanks
> Andrea
> Paulo Soares wrote:
>
> Are you adding any content to the pdf? A pdf with no
> content will throw an
> exception in Document.close().
>
> ----- Original Message -----
> From: "Andrea De Paoli" <[EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]>
> Cc: "Liscor - Giuseppe Polo" <[EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED]> ; "Liscor - Davide Valente"
> <[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]>
> Sent: Thursday, April 07, 2005 10:16 AM
> Subject: Problem
>
>
>
>
> Hi Paulo,
> I'm Andrea..an italian developer..I have a
> problem...I think a small
> problem for you...
> I should add some information (Title,
> Author...) to a pdf created by
> another process.
> I have tried this code:
>
> */ PdfReader pdfreader = new
> PdfReader(</**/pdf created by another
> process>);
> pdfreader.consolidateNamedDestinations();
> Document document = new
> Document(pdfreader.getPageSizeWithRotation(1));
> try {
> PdfWriter.getInstance(document, new
> FileOutputStream(<new
> pdf>/**/));
> document.addTitle("Stampa Fatture 3.3");
> document.addSubject("Stampa Fatture 3.3");
> document.addAuthor("Liscor S.p.A");
> document.open();
> } catch(Exception e) {
> System.err.println(e.getMessage());
> }
> document.close();
>
> /*but the new pdf is not correct(size 0).
> Why?...where is/are the error/errors into my code?
> Thanks for your help
> Andrea
>
> --
> _____________________________
> Andrea De Paoli
> LISCOR S.P.A.
> Corso Cristoforo Colombo, 10
> 20144 MILANO
> tel. +39 02 58152
> fax. +39 02 58152.499
> e-mail [EMAIL PROTECTED]
>
>
>
>
>
>
>
>
>
>
> --
> _____________________________
> Andrea De Paoli
> LISCOR S.P.A.
> Corso Cristoforo Colombo, 10
> 20144 MILANO
> tel. +39 02 58152
> fax. +39 02 58152.499
> e-mail [EMAIL PROTECTED]
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions