示例#1
0
        protected void Initialize(CodeActivityContext context)
        {
            doc = Document.Get(context);
            rec = Signer.Get(context);
            if (rec.RecipientType != "Signer")
            {
                throw new ArgumentException("Only Signers can have tabs added to them, not other Recipient types");
            }

            sigX = PositionX.Get(context);
            sigY = PositionY.Get(context);

            anchorText = AnchorText.Get(context);
            offsetX    = OffsetX.Get(context);
            offsetY    = OffsetY.Get(context);

            tabLabel   = TabLabel.Get(context);
            toolTip    = ToolTip.Get(context);
            pageNumber = PageNumber.Get(context);

            if (anchorText != null && anchorText != "" && Path.GetExtension(doc.filename) != ".pdf")
            {
                throw new FormatException("Can only use relative positioning on .pdf files");
            }
        }