i have some problems generating dinamically pdfs
with itext...
i have to put the number of pages (something
like... "page x of y")
but i don't know how can i do that
here i post my example of pdf
generation...
public static void makePdf(String model, PdfListForm list,
OutputStream stream) { Document doc = new
Document(PageSize.A4, 10, 10, 10, 10); try
{ PdfWriter pdfW =
PdfWriter.getInstance(doc, stream);
// i open directly my pdf in
acrobat reader from my intranet
application
doc.open(); doc.add(new Paragraph("
")); doc = createDocument(list,
doc); //i
create my pdf dinamically
doc.close(); } catch (DocumentException dex)
{
System.out.println("DocumentException > " +
dex.toString()); } catch (Exception ex)
{ System.out.println("Exception
> " + ex.toString()); } }
where can i put my footer with number of pages?? how
can i put a footer... i didn't understand very well what tutorial says
about PdfPageEvent....
Thank you in advance and sorry for my bad
english
Andrea Bertoli
---- Email.it, the professional e-mail,
gratis per te:clicca qui
Sponsor: Hai un sito web? Allora
guadagna anche tu con il Web Marketing ! Collegati subito. Clicca qui
|