Exemple #1
0
        internal static Separator CreateFromXElement(XElement element)
        {
            XNamespace xmlns = element.Name.Namespace;

            Separator separator = new Separator();
            separator.Style.PopulateFromXElement(element);

            return separator;
        }
Exemple #2
0
        public override iTextSharp.text.IElement GeneratePdfElement()
        {
            SignaturePanelStyle style = (Manifest != null) ? Manifest.Styles.GetMergedFromConfiguration(Style) : Style;

            Phrase phrase = new Phrase();

            Chunk signature = new Chunk(Signature);
            signature.Style.Font.Apply(style.Font);
            phrase.Content.Add(signature);
            phrase.Content.Add(new NewLine());

            Separator separator = new Separator();
            separator.Style.BorderColor = style.BorderColor;
            separator.Style.Width = style.BorderWidth;
            phrase.Content.Add(separator);

            GenericIdentity identity = new GenericIdentity(User);

            AD.ActiveDirectory activeDirectory = new AD.ActiveDirectory();
            UserDescriptor adUser = activeDirectory.GetUser(identity.GetUserName());
            string fullName = adUser.DisplayName;

            phrase.Content.Add(new NewLine());
            phrase.Content.Add(new Chunk(String.Format("{0} ({1:MMMM dd, yyyy})", fullName, Date)));

            PdfPanel panel = new PdfPanel(phrase);
            panel.Style.BackgroundColor = style.BackgroundColor;
            panel.Style.BorderColor = style.BorderColor;
            panel.Style.Padding = style.Padding;
            panel.Style.BorderWidth = style.BorderWidth;
            panel.Style.Width = style.Width;

            return panel.GeneratePdfElement();
        }