Annotated File Attachment Icon Size

When adding an annotated file attachment one of the parameters is a Rect(x1, y1, x2, y2). This determines the placement and size of the icon. What if anyone knows is the proper size for the "Paperclip" icon. Comparing it to the default paperclip icon in Acrobat it not only looks a little different, but acts different. Acrobat's paperclip icon seems to scale (remaining the same size) with the document depending on your window size, whereas the PDFTron paperclip icon gets smaller and larger.

1. I'm ok with it getting larger and smaller, but I would like it to be the default, proper size.

2. When hovering the annotation it gives you the "path" of the file as when it was attached. This makes it seem that the document is not embedded. However the document is embedded. Is there a way to change the hover text? In a perfect world, it would just be the document name as it is in Acrobat.

Any help would be appreciated.

Thanks.

Hi Matthew,

the PDF spec doesn’t actually specify the appearance if icons such as the file attachment icon. It is up to the reader itself to decide how to render this. So there is no default, proper size. It is possible to set the appearance stream manually, in which case readers are supposed to use that instead of the built in type.

For tooltips, you may want to use annot.SetTextContents(“My Text”).