StringReader sr = new StringReader(GridHtml);
Document pdfDoc = new Document(PageSize.A4, 80, 50, 30, 65);
// Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 100f, 0f);
PdfWriter writer = PdfWriter.GetInstance(pdfDoc, stream);
Rectangle rect = new Rectangle(100, 100, 100, 100);
RadioCheckField checkbox = new RadioCheckField(writer, rect, "bhjabsdf", "on");
pdfDoc.Open();
checkbox = new RadioCheckField(writer, rect, "abc", "on");
checkbox.CheckType = RadioCheckField.TYPE_CHECK;
PdfFormField field = checkbox.CheckField;
XMLWorkerHelper.GetInstance().ParseXHtml(writer, pdfDoc, sr);
pdfDoc.Close();
System.Diagnostics.Process.Start("C:\\Users\\Mudassar Iqbal\\Downloads\\Grid.pdf");
return File(stream.ToArray(), "application/pdf", "Grid.pdf");
What shoud i do to remove or solve this error and same error i'm facing when i've to convert check boxes and radio buttons into pdf