示例#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);
        }
示例#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);
            PdfContentByte cb = writer.DirectContent;
            PdfAppearance  pa = cb.createAppearance(urx - llx, ury - lly);

            pa.Add(appearance);
            button.setAppearance(PdfAnnotation.APPEARANCE_NORMAL, pa);
            addFormField(button);
            return(button);
        }