OK. Now code looks like this and its still doesn't work: public void putDataToPdf(String existing_pdf) { try { PdfReader reader = new PdfReader(existing_pdf_file); int nu_pages = reader.getNumberOfPages(); PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(new_pdf_file)); PdfContentByte over; BaseFont helv = BaseFont.createFon( BaseFont.COURIER_BOLD, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED); for(int curPage = 1; curPage <= nu_pages; curPage++){ over = stamper.getOverContent(curPage); over.beginText(); over.setFontAndSize(helv, 11); over.setTextMatrix(57, 635); over.showText("Text has to be added !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); over.endText(); } stamper.close(); } catch (IOException ioe) { ioe.printStackTrace(); System.out.println(ioe.getMessage()); } catch (DocumentException de) { de.printStackTrace(); System.out.println(de.getMessage()); } }
I have text on first page but i don't have on others. My existing_pdf has three pages. -- View this message in context: http://www.nabble.com/pdf-Image-to-real-Image--tp16475931p16487279.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar