public static PdfAnnotation CreateFileAttachment(PdfWriter writer, Rectangle rect, String contents, PdfFileSpecification fs)
{
PdfAnnotation annot = new PdfAnnotation(writer, rect);
annot.Put(PdfName.SUBTYPE, PdfName.FILEATTACHMENT);
if (contents != null)
annot.Put(PdfName.CONTENTS, new PdfString(contents, PdfObject.TEXT_UNICODE));
annot.Put(PdfName.FS, fs.Reference);
return annot;
}