Mudassar Iqbal

Mudassar Iqbal

  • 2.1k
  • 42
  • 1.8k

iTextSharp.tool.xml.exceptions.RuntimeWorkerException: 'Inva

Jan 22 2018 11:02 AM
I'm facing above metioned errro where my controller code is given below:
 
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 

Answers (1)