Beispiel #1
0
        public PdfFormField AddHtmlPostButton(string name, string caption, string value, string url, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)
        {
            PdfAction    action = PdfAction.CreateSubmitForm(url, null, PdfAction.SUBMIT_HTML_FORMAT);
            PdfFormField button = new PdfFormField(writer, llx, lly, urx, ury, action);

            SetButtonParams(button, PdfFormField.FF_PUSHBUTTON, name, value);
            DrawButton(button, caption, font, fontSize, llx, lly, urx, ury);
            AddFormField(button);
            return(button);
        }
Beispiel #2
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);
        }