public static PdfAnnotation CreatePopup(PdfWriter writer, Rectangle rect, string contents, bool open)
{
PdfAnnotation annot = new PdfAnnotation(writer, rect);
annot.Put(PdfName.SUBTYPE, PdfName.POPUP);
if (contents != null)
annot.Put(PdfName.CONTENTS, new PdfString(contents, PdfObject.TEXT_UNICODE));
if (open)
annot.Put(PdfName.OPEN, PdfBoolean.PDFTRUE);
return annot;
}