Hi,

To give more informations about the problem I have is when I go to the part 
"file attachments", I have the list of all the files I have imported into the 
PDF. Then when I click on one of those midi files I have the error message 
"There was a problem reading the document (14)". I am surprised because in the 
list of all the files, the size column has the value "unknown" for each row...

Do you have an idea ? Do you think I have to give the mime type ?

Thanks

>Hi,
>
>I use the "createFileAttachment" as you said so I have an icon following >by a 
>title (txt1) and a description
>(txt2) when the cursor is placed on the icon. The problem is that when I 
>>click on the icon I have the following
>message "There was a problem reading the document (14)"... 
>
>The following code is the method use to create a chunk with an >annotation :
>
>private Chunk genererAnnotationAttachedFile(String txt1, String txt2,
>                       PdfFileSpecification spec, PdfWriter writer) throws 
> >Exception {
>               Font fonte = FontFactory.getFont(FontFactory.HELVETICA, 14,
>                               Font.BOLDITALIC, new Color(255, 255, 255));
>               Chunk chunk = new Chunk(txt1, fonte);
>               PdfAnnotation annot = 
> >PdfAnnotation.createFileAttachment(writer,
>                               new Rectangle(100f, 100f, 100f, 100f), txt2, 
> spec);
>               chunk.setAnnotation(annot);
>               return chunk;
>}
>
>I remember that I try to embed an midi file... With Acrobat Reader when >I go 
>to  the attachments files (window)
>I have the same problems when I try to open the files... Nevertheless, >my 
>midi files are correct and are
>playing well on my OS...
>
>So an idea ? Must I give the mime type of the file somewhere ?
>
>Thanks


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