Exemple #1
0
        public static void AddEmptyLine(RtfDocument rtfDocument, float fontSize, HorizontalAlignment alignment)
        {
            var paragraph = rtfDocument.AddParagraph();

            paragraph.HorizontalAlignment = alignment;
            paragraph.AddCharFormat().FontSize = fontSize;
        }
Exemple #2
0
 public static void AligmentColumn(RtfTable table, int column, int row1, int row2, HorizontalAlignment alignment, int fontSize = 12)
 {
     try
     {
         for (var i = row1; i <= row2; i++)
         {
             table.Cell(i, column).HorizontalAlignment        = alignment;
             table.Cell(i, column).DefaultCharFormat.FontSize = fontSize;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #3
0
        public static void AddTextToDocument(RtfDocument rtfDocument, float fontSize, HorizontalAlignment alignment,
                                             string text)
        {
            var paragraph = rtfDocument.AddParagraph();

            paragraph.HorizontalAlignment = alignment;
            paragraph.AddCharFormat().FontSize = fontSize;
            paragraph.Text = text;
        }