title: How can I increase the font size while generating a PDF file using this code?
body: <p>I got a working answer to my question on printing four "quarter page" sections on one fullsize page with iTextSharp <a href="https://stackoverflow.com/questions/35959487/how-can-i-combine-four-quarter-pages-into-one-fullsize-page-using-itextsharp">here</a>.</p>
  
  <p>The problem is that the print is sort of puny; here's an example of the top half of a page - you can see how small the print is as well as how much extra space is available:</p>
  
  <p><a href="https://i.stack.imgur.com/ipcDX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ipcDX.png" alt="enter image description here"></a></p>
  
  <p>This is the code that is used, based on the answer provided on the heretofore linked SO post:</p>
  
  <pre><code>public static void PrintSlips(List&lt;AssignmentStudentMashup&gt; asmList)
  {
      PdfReader reader = new PdfReader(GetMasterDocument(asmList));
      Rectangle pageSize = reader.GetPageSize(1);
      string printedDate = DateTime.Now.ToShortDateString();
      printedDate = printedDate.Replace("/", "_");
      string printedSlipsFile = $"C:\\AYttFMApp\\AYttFMSlips_{printedDate}.pdf";
  
      // Delete the file if it exists.
      if (File.Exists(printedSlipsFile))
      {
          File.Delete(printedSlipsFile);
      }
  
      using (FileStream stream = new FileStream(
          printedSlipsFile,
          FileMode.Create,
          FileAccess.Write))
      {
          using (Document document = new Document(pageSize, 0, 0, 0, 0)) // pageSize could be replaced with "A4"
          {
              PdfWriter writer = PdfWriter.GetInstance(document, stream);
              document.Open();
              PdfPTable table = new PdfPTable(2)
              {
                  TotalWidth = pageSize.Width,
                  LockedWidth = true
              };
              table.DefaultCell.Border = Rectangle.NO_BORDER;
              table.DefaultCell.FixedHeight = pageSize.Height / 2;
  
              for (int i = 1; i &lt;= reader.NumberOfPages; i++)
              {
                  PdfImportedPage page = writer.GetImportedPage(reader, i);
                  table.AddCell(Image.GetInstance(page));
              }
              document.Add(table);
          }
      }
  }
  
  internal static byte[] GetMasterDocument(List&lt;AssignmentStudentMashup&gt; asmList)
  {
      int count = asmList.Count;
      using (var stream = new MemoryStream())
      {
          using (var document = new Document())
          {
              PdfWriter.GetInstance(document, stream);
              document.Open();
              for (int i = 1; i &lt; count; ++i)
              {
                  document.Add(new Paragraph(
                      $@"WeekOfAssignment: {asmList[i].WeekOfAssignment}
                        TalkTypeName: {asmList
                          [i].TalkTypeName}
                        StudentFullname: {asmList[i]
                              .StudentFullname}
                        AssistantFullname: {asmList[i]
                                  .AssistantFullname}
                        CounselPointNum: {asmList[i]
                                      .CounselPointNum}
                        CounselPointStr: {asmList[i
                                          ].CounselPointStr}"));
                  if (i &lt; count) document.NewPage();
              }
          }
          return stream.ToArray();
      }
  }
  </code></pre>
  
  <p>I assume the place to increase the font would be somewhere in GetMasterDocument(), but I don't know where/what to do. Also, I would like to bold the first portion of each line (the part that precedes the ":").</p>
  
  <h2>UPDATE</h2>
  
  <p>I tried Agus Rdz's suggestion from the link he provided:</p>
  
  <pre><code>BaseFont bfCourier = BaseFont.CreateFont(BaseFont.COURIER, BaseFont.CP1252, false);
  Font courier = new Font(bfCourier, 12, Font.BOLD, Color.Black);
  . . .
  CounselPointStr: {asmList[i
      //].CounselPointStr}"));
        ].CounselPointStr}", courier));
  </code></pre>
  
  <p>...but that won't compile; I get:</p>
  
  <p><em>Error  CS1503  Argument 1: cannot convert from 'iTextSharp.text.pdf.BaseFont' to 'iTextSharp.text.Font.FontFamily'</em>    </p>
  
  <p>...and:</p>
  
  <p><em>Error  CS1503  Argument 4: cannot convert from 'System.Drawing.Color' to 'iTextSharp.text.BaseColor'   AYttFMScheduler</em>    </p>
  
  <p>So I then tried this, based on a comment added to that blog post:</p>
  
  <pre><code>Font fMSGothic = FontFactory.GetFont("MS-PGothic", BaseFont.IDENTITY_H, 16);
  . . .
  CounselPointStr: {asmList[i
      //].CounselPointStr}"));
        ].CounselPointStr}", courier));
  </code></pre>
  
  <p>...which compiles, but with that I get an I/O Exception, more specifically "<em>Document has no pages</em>"</p>