Example #1
0
        public PdfFormField AddMap(string name, string value, string url, PdfContentByte appearance, float llx, float lly, float urx, float ury)
        {
            PdfAction    action = PdfAction.CreateSubmitForm(url, null, PdfAction.SUBMIT_HTML_FORMAT | PdfAction.SUBMIT_COORDINATES);
            PdfFormField button = new PdfFormField(writer, llx, lly, urx, ury, action);

            SetButtonParams(button, PdfFormField.FF_PUSHBUTTON, name, null);
            PdfAppearance pa = PdfAppearance.CreateAppearance(writer, urx - llx, ury - lly);

            pa.Add(appearance);
            button.SetAppearance(PdfAnnotation.APPEARANCE_NORMAL, pa);
            AddFormField(button);
            return(button);
        }