There is no exception.
Should i send the whole code?

----- Original Message ----- 
From: "Paulo Soares" <[EMAIL PROTECTED]>
To: "Post all your questions about iText here" 
<[email protected]>
Sent: Friday, January 18, 2008 6:56 PM
Subject: Re: [iText-questions] Stamper and Annotation for embeding a SWF


> Maybe you should read the thrown exception.
>
> Paulo
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On
>> Behalf Of [EMAIL PROTECTED]
>> Sent: Friday, January 18, 2008 5:31 PM
>> To: [email protected]
>> Subject: [iText-questions] Stamper and Annotation for embeding a SWF
>>
>> 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
>
>
> Aviso Legal:
> Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
> informação confidencial ou legalmente protegida. A incorrecta transmissão 
> desta mensagem não significa a perca de confidencialidade. Se esta 
> mensagem for recebida por engano, por favor envie-a de volta para o 
> remetente e apague-a do seu sistema de imediato. É proibido a qualquer 
> pessoa que não o destinatário de usar, revelar ou distribuir qualquer 
> parte desta mensagem.
>
> Disclaimer:
> This message is destined exclusively to the intended receiver. It may 
> contain confidential or legally protected information. The incorrect 
> transmission of this message does not mean the loss of its 
> confidentiality. If this message is received by mistake, please send it 
> back to the sender and delete it from your system immediately. It is 
> forbidden to any person who is not the intended receiver to use, 
> distribute or copy any part of this message.
>
> -------------------------------------------------------------------------
> 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/
> 


-------------------------------------------------------------------------
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/

Reply via email to