Hello,

When I attach a file (pdf/word/png) It works fine and via the attachment 
pane I can open all these files by clicking on it.

However when cliking in the text on the "link"  it only works for pdf 
files. All other files do not open by clicking the link. No error message 
is given nothing happens

I searched the web , the book without finding a solution
Can somebody help



my code (a method I wrote)

public  static Paragraph add_attachement_to_paragraph_gotoaction(String 
filename,String dirpath,String description ,PdfWriter fdfwr) throws 
IOException {
 
                PdfTargetDictionary target;
                PdfDestination dest;
                Chunk chunk;
                PdfAction action = null;
                PdfFileSpecification fs;
                Paragraph p;
                dest =new PdfDestination(PdfDestination.FIT);
                dest.addFirst(new PdfNumber(0)); 
                fs = PdfFileSpecification.fileEmbedded(fdfwr,dirpath + 
"\\" + filename, filename,  null);
                fs.addDescription(description,false);
                fdfwr.addFileAttachment(fs);
                target = new PdfTargetDictionary(true);
                target.setEmbeddedFileName(description); 
                action = PdfAction.gotoEmbedded(null, target, dest, true);
                chunk = new Chunk(" " +filename);
                chunk.setAction(action);
                p = new Paragraph("",verysmallblue);
                p.setSpacingAfter(5f);
                p.add(chunk);
                p.add(".");
                return p;
 
        }
Groeten,
Bien à vous

Herman Boudenoodt
Belgocontrol - Administratief gebouw H 1.5.28
Tervuursesteenweg 303
1820 Steenokkerzeel
B-1820 Belgium
Phone: +32 2 206-23-60
GSM: 0479 950645
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to