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
----Message d'origine----
>De: "Paulo Soares" <[EMAIL PROTECTED]>
>A: "Post all your questions about iText here"
><[email protected]>
>Date: Sat, 10 Feb 2007 16:12:16 -0000
>Sujet: Re: [iText-questions] midi files into PDF
>
>Use PdfAnnotation.createFileAttachment(). This is explained in the chapter
>15 of the book.
>
>Paulo
>
>----- Original Message -----
>From: "François Sénéquier" <[EMAIL PROTECTED]>
>To: <[email protected]>
>Sent: Saturday, February 10, 2007 3:19 PM
>Subject: Re: [iText-questions] midi files into PDF
>
>
>Thank you,
>
>So I try do use the following code :
>
>chemin = ".";
>spec = PdfFileSpecification.fileExtern(writer, chemin);
>writer.addFileAttachment(nom, spec);
>
>So the file is attached in the PDF, but now, how to put a text with a link
>on this embedded file ? I can get the reference of this embedded file by
>"spec.getReference()" but after ?
>
>Thanks again
>
>----Message d'origine----
>>De: "Paulo Soares" <[EMAIL PROTECTED]>
>>A: "Post all your questions about iText here"
>><[email protected]>
>>Date: Sat, 10 Feb 2007 09:41:09 -0000
>>Sujet: Re: [iText-questions] midi files into PDF
>>
>>A file attachment should be enough.
>>
>>Paulo
>>
>>----- Original Message -----
>>From: "François Sénéquier" <[EMAIL PROTECTED]>
>>To: <[email protected]>
>>Sent: Saturday, February 10, 2007 9:18 AM
>>Subject: [iText-questions] midi files into PDF
>>
>>
>>> Hello,
>>>
>>> Is it possible to put midi files directly into a PDF generated with iText
>>> ? The purpose is to have just one PDF file with midi files inside and to
>>> put link into the PDF for each midi file. Then to click on the link
>>> should
>>> play the associated midi file...
>>>
>>> Thanks
>>>
>>>
>>>
>>>
>>> -------------------------------------------------------------------------
>>> Using Tomcat but need to do more? Need to support web services, security?
>>> Get stuff done quickly with pre-integrated technology to make your job
>>> easier.
>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>>> Geronimo
>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>>> _______________________________________________
>>> 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/
>>
>>
>>-------------------------------------------------------------------------
>>Using Tomcat but need to do more? Need to support web services, security?
>>Get stuff done quickly with pre-integrated technology to make your job
>>easier.
>>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>>_______________________________________________
>>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/
>>
>
>
>-------------------------------------------------------------------------
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job
>easier.
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>_______________________________________________
>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/
>
>
>-------------------------------------------------------------------------
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job easier.
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>_______________________________________________
>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/
>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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/