PdfAnnotation videoAnnotation =
PdfAnnotation.createScreen(
cb.getPdfWriter(),
rect,
"TEST Movies Annotation", fs,
"video/mpeg", true);
Paulo
> -----Original Message-----
> From: KevinJC [mailto:endlessmin...@yahoo.com]
> Sent: Thursday, February 11, 2010 2:36 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Placing a screenAnnotation in a PdfPCell
>
>
> IText version: 5.0.1
>
> Hello All. I'm a newbie here.
>
> I'm trying to place a screen annotation inside a PdfPCell via
> a PdfPCellEvent as such.
>
>
> class VideoCellEvent implements PdfPCellEvent {
> public void cellLayout(PdfPCell cell, Rectangle
> rect, PdfContentByte[] canvas) {
> logger.info("inside cellLayout");
> PdfContentByte cb = canvas[PdfPTable.TEXTCANVAS];
> PdfFileSpecification fs;
> try {
> fs = PdfFileSpecification.fileEmbedded(
> cb.getPdfWriter(),
> "../resources/movies/form.mpg",
> "form.mpg", null
> );
>
> PdfAnnotation videoAnnotation =
> PdfAnnotation.createScreen(
> cb.getPdfWriter(),
> new Rectangle(200f, 700f, 300f, 800f),
> "TEST Movies Annotation", fs,
> "video/mpeg", true);
>
>
> cb.getPdfWriter().addAnnotation(videoAnnotation);
>
>
> }
> catch (IOException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
>
>
>
>
> }
> }
>
> When the above code is executed. The annotation does play.
> However. It shows in the middle of the page. Not at all what
> I was expecting.
>
> Does anyone know how to get the screen annotation inside the cell.
>
> Thanks in advance.
>
>
>
>
>
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.
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php
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/