public void AddAnswer(Document _document, ResultDto result) { Paragraph paragraph = new Paragraph(result.ResultString, new Font(CustomFont.BaseFontVerdana(), Context.SIZE)); paragraph.SpacingBefore = Context.SPACINGBEFORE; paragraph.IndentationLeft = Context.SPACINGLEFT; _document.Add(paragraph); }
public void AddAnswer(Document _document, ResultDto result) { var dateTimeResult = result.ResultDateTime.HasValue ? result.ResultDateTime.Value.ToShortDateString() : ""; Paragraph paragraph = new Paragraph(dateTimeResult, new Font(CustomFont.BaseFontVerdana(), Context.SIZE)); paragraph.SpacingBefore = Context.SPACINGBEFORE; paragraph.IndentationLeft = Context.SPACINGLEFT; _document.Add(paragraph); }
private static void ShowAResult(Document _document, ResultDto result) { var text = result.ResultList[0].ToString(); Paragraph paragraph = new Paragraph(text, new Font(CustomFont.BaseFontVerdana(), Context.SIZE)); paragraph.SpacingBefore = Context.SPACINGBEFORE; paragraph.IndentationLeft = Context.SPACINGLEFT; _document.Add(paragraph); }
public void AddQuestion(string text) { Paragraph paragraph = new Paragraph(text, new Font(CustomFont.BaseFontVerdana(), 10f, Font.BOLD)); paragraph.SpacingBefore = 5f; paragraph.SpacingAfter = -5f; paragraph.IndentationLeft = 10f; _document.Add(paragraph); }
public void AddAnswer(Document _document, ResultDto result) { var formatInteger = result.ResultInteger.HasValue ? result.ResultInteger.Value.ToString("N0") : ""; Paragraph paragraph = new Paragraph(formatInteger, new Font(CustomFont.BaseFontVerdana(), Context.SIZE)); paragraph.SpacingBefore = Context.SPACINGBEFORE; paragraph.IndentationLeft = Context.SPACINGLEFT; _document.Add(paragraph); }
public Cover(string title, string subject, string description1, string description2, string description3) { header = new Phrase[] { new Phrase(title, new Font(CustomFont.BaseFontVerdana(), 50f, Font.BOLD)), new Phrase(subject, new Font(CustomFont.BaseFontVerdana(), 35f, 1, BaseColor.GRAY)), new Phrase(description1, new Font(CustomFont.BaseFontVerdana(), 12f)), new Phrase(description2, new Font(CustomFont.BaseFontVerdana(), 12f)), new Phrase(description3, new Font(CustomFont.BaseFontVerdana(), 12f)) }; }
public void AddAnswer(Document _document, ResultDto result) { var matrixInOneList = result.ResultMatrix.SelectMany(x => x).ToList(); var cell = matrixInOneList.Aggregate((current, next) => current + ", " + next); Paragraph paragraph = new Paragraph(cell, new Font(CustomFont.BaseFontVerdana(), Context.SIZE)); paragraph.SpacingBefore = Context.SPACINGBEFORE; paragraph.IndentationLeft = Context.SPACINGLEFT; _document.Add(paragraph); }
public void AddSection(string text) { Paragraph paragraph = new Paragraph(text, new Font(CustomFont.BaseFontVerdana(), 14f)); Chapter chapter = new Chapter(paragraph, 0); chapter.NumberDepth = 0; paragraph.IndentationLeft = 10f; ChapterBorder border = new ChapterBorder(); _writer.PageEvent = border; border.SetActive(true); _document.Add(chapter); border.SetActive(false); }
private static void ShowList(Document _document, ResultDto result) { //Font zapfdingbats = new Font(FontFamily.ZAPFDINGBATS, 8); Font font = new Font(CustomFont.BaseFontVerdana(), Context.SIZE); //Chunk bullet = new Chunk((char)109, zapfdingbats); Paragraph paragraph = new Paragraph(null, font); paragraph.IndentationLeft = 20f; paragraph.SpacingBefore = Context.SPACINGBEFORE; foreach (var item in result.ResultList) { //paragraph.Add(bullet); paragraph.Add(new Phrase(" " + item + " \n", font)); } _document.Add(paragraph); }
public WaterMark(string textWatermark) { _textWatermark = textWatermark; _watermark = new Phrase(_textWatermark, new Font(CustomFont.BaseFontVerdana(), 60, Font.NORMAL, BaseColor.LIGHT_GRAY)); }
public override void OnOpenDocument(PdfWriter writer, Document document) { header[0] = new Phrase(_textHeaderRight, new Font(CustomFont.BaseFontVerdana())); }
public override void OnOpenDocument(PdfWriter writer, Document document) { footer[0] = new Phrase(_textFooterLeft, new Font(CustomFont.BaseFontVerdana())); }