I don't know where you discovered that your document was "PDF/SigQ compliant",
but I don't that has anything to do with this issue.
Can you post a sample PDF that gives a problem?
From: surya.pavan [mailto:[email protected]]
Sent: Tuesday, September 14, 2010 12:22 AM
To: [email protected]
Subject: [iText-questions] Could not able to add image to existing pdf.
Hi, Thanks in advance.I am java guy. I have a "not pdf/sigq complaint" pdf as
the input to my java prgm. i have to insert a image to the existing document.I
couldnt able to add a image to the pdf/sigq document rather than any other
documents without any exception from the below java code. Concern: 1.Is there
any way to print logo in non-complaince documents 2.Can we identify the
scanerio that document is noncomplaince while reading it at the earliest.
Awaiting for the quick response. Please find the delow code snippet:
=======================================================================
PdfStamper stamper=null; ByteArrayOutputStream pdfStream = new
ByteArrayOutputStream(); PdfReader reader = new PdfReader(new
FileInputStream("input.pdf")); stamper= new PdfStamper(reader, pdfStream ) ;
PdfContentByte canvas = stamper.getOverContent(1); // try to print on page# 1
BufferedImage buffImage=ImageIO.read(new File("logo-path")); byte[]
phImageBytes = convertImageToBytes(buffImage); // conversion of image to bytes
Image logoImage= Image.getInstance(phImageBytes);
logoImage.setAbsolutePosition(50,50); canvas.addImage(logoImage);
System.out.println("version"+canvas.getPdfWriter().); stamper.close();
FileOutputStream fos = new FileOutputStream("output.pdf");
fos.write(signedPdfStream.toByteArray());
============================================================================
________________________________
View this message in context: Could not able to add image to existing
pdf.<http://itext-general.2136553.n4.nabble.com/Could-not-able-to-add-image-to-existing-pdf-tp2538398p2538398.html>
Sent from the iText - General mailing list
archive<http://itext-general.2136553.n4.nabble.com/> at Nabble.com.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/