예제 #1
0
        public void AddSubheader(string header, bool isLargeBottomSpacing)
        {
            var settings = new PdfTextSettings {
                Align         = Element.ALIGN_CENTER,
                TextSize      = 18,
                SpacingBefore = _hasContent ? 15 : 0,
                SpacingAfter  = isLargeBottomSpacing ? 15 : 10
            };

            AddHeader(header, settings);
        }
예제 #2
0
        private void AddHeader(string header, PdfTextSettings settings)
        {
            CreateDocument();

            Font font = CreateFont(settings.TextSize);

            var paragraph = new Paragraph(header, font);

            paragraph.Alignment     = settings.Align;
            paragraph.SpacingBefore = settings.SpacingBefore;
            paragraph.SpacingAfter  = settings.SpacingAfter;

            _doc.Add(paragraph);
        }