I'm very sorry about that. Please forgive my lack of knowledge.
Actually, I'm trying to embed a wav file in a sound annotation. The problem
is that I do not not know what to put for "Sound" key to perform this.
So I try to create a file specification, and to put it for Sound key value
but it did not work.
What I tried to do is to put the reference of the file specification in
Sound key value.
Well, I know now it will not work.

PDFReference reads that for audio with file specification, Sound key must
have value F.
What I am wondering is where should I put the file specification?

Here is the Code, what should I do with fs?

//Creating annotation
           com.lowagie.text.pdf.PdfAnnotation annotation =
           new com.lowagie.text.pdf.PdfAnnotation(stamp.getWriter(),
           new Rectangle(100, 750, 110, 760));

           annotation.put(PdfName.SUBTYPE,new PdfName("Sound"));

//Creating File specification
           com.lowagie.text.pdf.PdfFileSpecification fs=
               com.lowagie.text.pdf.PdfFileSpecification.fileEmbedded(
stamp.getWriter()
                       , "try.wav", "try.wav"
                       , null);

//Put the F value into Sound key
           annotation.put(new PdfName("Sound"),PdfName.F);

2007/2/15, Bruno Lowagie (iText) <[EMAIL PROTECTED]>:

Tony Chhun wrote:
> How to retrieve the reference on a PdfObject?

Please clarify.
Do you know the object number, and now you want the object.
Do you know the object, but now you want its number?
If you know the object, how do you know the object?
How did you get the PdfObject instance?
And even more important: why do you want to know the object number?

The fact that you ask such a question means that you're working with PDF
on the low, PDF syntax level. The fact that you work on the PDF syntax
level means that you know what you're doing, therefor you probably know
what you're doing and don't need to ask this question.

br,
Bruno

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

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