Problem Applying Watermark to files created by Adobe illustrat 2006-07-31 - By mohan alagurajan
Back
Hi All,
Thanks, for the continued help provided by everyone in this forum.
I have to apply Watermark to PDFDocuments, and I use the code below for that, it works fine except for some documents which are created by Adobe Illustrator and I dont know the reason why? Is there any problem with the following code or is it a bug in iText? Is there any workaround for this problem.
PdfReader reader = new PdfReader("C:/26JUL2005.pdf"); PdfStamper stamper = new PdfStamper(reader, new FileOutputStream("C:/stamped/26JUL2005_stamped.pdf")); int pages = reader.getNumberOfPages(); System.out.println("Pages: " + pages); int i=0; PdfContentByte over = null; BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.EMBEDDED); while (i<pages){ i++; System.out.println("Processing Page : " + i); over = stamper.getOverContent(i); over.beginText(); over.setFontAndSize(bf, 8); over.setTextMatrix(30, 30); over.showText("Watermark Text"); over.setFontAndSize(bf, 8); over.endText(); } stamper.setFormFlattening(true); stamper.close(); -- View this message in context: http://www.nabble.com/Problem-Applying-Watermark -to-files-created-by-Adobe-illustrator-tf2029229.html#a5581233 Sent from the iText - General forum at Nabble.com.
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- 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 iText-questions@(protected) https://lists.sourceforge.net/lists/listinfo/itext-questions
|
|