title: PDF file shows only 3 or more checked items
body: <p>I have a Kendo Grid with a column (UniqueId) that can be checked:</p>
  
  <pre><code>columns.Bound(c =&gt; c.UniqueId.ClientTemplate("&lt;input type='checkbox'  class='primaryBox' id='#= UniqueId #' value='#= UniqueId #'&gt;#= UniqueId #&lt;/input&gt;");  
  </code></pre>
  
  <p>The checked items have been sent to the ASP.NET MVC Controller (C#) by javascript function:</p>
  
  <pre><code>function getChecked() {        
  
          var ids = new Array();
  
          $('.primaryBox:checked').map(function (index) {
              ids.push(this.id);
          });        
  
          $.ajax({
              type: "POST",
              url: "/PatientReport/ExportToPDF",
              dataType: "json",
              traditional: true,
              data: { uniqueIds: ids },
              success: function (data) {
                  if (data.success) {                    
                      $('#myFrame').attr('src', '/PatientReport/DownloadFile' + '?fName=' + data.fName);                   
                  } else {                   
                  }
  
              },
              error: function (jqXHR, textStatus, errorThrown) {
                  $('#checkedMsg').text('@ELRegistry.Resources.Views.Patient.PatientStrings.CheckedError').show();
  
              }
          });
      }
  </code></pre>
  
  <p>In the Controller I have an Action ExportToPDF (using iTextSharp), that put checked UniqueIds to PDF:</p>
  
  <pre><code>[AcceptVerbs(HttpVerbs.Post)]
          public ActionResult ExportToPDF(List&lt;String&gt; uniqueIds)       {
  
              var document = new Document(PageSize.A4.Rotate(), 3, 3, 80, 50);            
  
              //step 2: we create a memory stream that listens to the document
              var output = new MemoryStream();            
  
              PdfWriter writer = PdfWriter.GetInstance(document, output);
              writer.CloseStream = false;
  
              // calling PDFFooter class to Include in document
              writer.PageEvent = new PDFFooter();
  
              //step 3: we open the document
  
              document.Open();            
  
              // here is the code that puts to the dataTable
              ...
  
              and then:   
  
              // Add table to the document
              document.Add(dataTable);
  
              //This is important don't forget to close the document
              document.Close();
  
  
  
              byte[] byteInfo = output.ToArray();
              output.Write(byteInfo, 0, byteInfo.Length);
              output.Position = 0;          
  
  
              var fName = string.Format("File-{0}.pdf", DateTime.Now.ToString("s"));
              Session[fName] = output;
  
              return Json(new { success = true, fName }, JsonRequestBehavior.AllowGet);
  
          }
  </code></pre>
  
  <p>and an Action DownloadFile:</p>
  
  <pre><code>public ActionResult DownloadFile(string fName)
          {
              var ms = Session[fName] as MemoryStream;
              if (ms == null)
                  return new EmptyResult();
              Session[fName] = null;
              return File(ms, "application/pdf", fName);
          }
  </code></pre>
  
  <p>My problem is in that when I check 1 or 2 UniqueIds, the PDF file doesn't show them (in JavaScript function I see ids, in ExportToPDF Action everything is ok, but the PDF file doesn't show them). If I check 3 or more UniqueIds, everything is fine in the PDF file. Any ideas? How to solve this? Thank you in advance for any help.</p>