How do I turn off the icon for the file attachment?


When I add a file attachment to a PDF (via Annot), how do I turn off
the icon for the file attachment?

The code I'm using is:
Annot file_attach = Annot.CreateFileAttachment( _outDoc.GetSDFDoc(),
iconRect, localPath, "None" );
_page.AnnotPushBack( file_attach );

When viewing the file in Acrobat 8.0, I get a "pushpin" icon next.
How do I get ride of this icon?


Based on your requirements it seems that you would like to associate
the attachment with the document instead of the page.

If you want to associates a file attachment with the document, use
For example:

FileSpec fs = FileSpec.Create(doc, "myexternal.pdf", true);
doc.AddFileAttachment("MyFile", fs);

If you want to create a file attachment annotation on a given page use
(and create an annotation object), you can call
Annot.CreateFileAttachment(), but this will also create the icon (i.e.
the annotation) on the page.

How can I set the value of the tooltip?

You may want to use annot.SetTextContents("My Text");