Hello,
I have a problem with the simple annotation and the stamper function.
I want to add a swf to my PDF. I used this simple annotation like shown
in the tutorial.
--> PdfContentByte cb2 = writer2.getDirectContent();
Annotation a5 = new Annotation(100f, 700f, 200f, 800f,
"chapter15/resources/demo1.swf", "application/x-shockwave-flash", true);
This works already fine.
Now I tried to use the stamper.
But it doesn´t work.
Please help me:
PdfReader reader = new PdfReader("template.pdf");
Document document = new Document(reader.getPageSize(1));
PdfStamper stamper = new PdfStamper(reader, new
FileOutputStream("z123.pdf"));
stamper.getWriter().setPdfVersion(PdfWriter.VERSION_1_7);
PdfContentByte over;
over = stamper.getOverContent(1);
PdfContentByte cb2 = over;
Annotation a5 = new Annotation(pageunits.mm(160), pageunits.mm(160),
pageunits.mm(160), pageunits.mm(160),
"demo1.swf", "application/x-shockwave-flash", true);
cb2.rectangle(100, 700, 100, 100);
//stamper.getWriter().add(a5);
stamper.getOverContent(1).getPdfWriter().add(a5);
thanks for your help.
Markus
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/