Example #1
0
        /**
         * @param field
         * @param llx
         * @param lly
         * @param urx
         * @param ury
         */
        public void DrawSignatureAppearences(PdfFormField field, float llx, float lly, float urx, float ury)
        {
            PdfAppearance tp = PdfAppearance.CreateAppearance(writer, urx - llx, ury - lly);

            tp.SetGrayFill(1.0f);
            tp.Rectangle(0, 0, urx - llx, ury - lly);
            tp.Fill();
            tp.SetGrayStroke(0);
            tp.SetLineWidth(1);
            tp.Rectangle(0.5f, 0.5f, urx - llx - 0.5f, ury - lly - 0.5f);
            tp.ClosePathStroke();
            tp.SaveState();
            tp.Rectangle(1, 1, urx - llx - 2, ury - lly - 2);
            tp.Clip();
            tp.NewPath();
            tp.RestoreState();
            field.SetAppearance(PdfAnnotation.APPEARANCE_NORMAL, tp);
        }