I am evaluating DynamicPDF and trying to fill an Acro form and I get the following exception:
----------------------
Unable to cast object of type 'zz93.c3' to type 'zz93.k8'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Unable to cast object of type 'zz93.c3' to type 'zz93.k8'.
Source Error:
Line 9:
Line 10: // Create the pdf document
Line 11: MergeDocument doc = new MergeDocument(rootpath + "formtest.pdf");
Line 12:
Line 13: // fill the fields from the first page
Source File: c:\Users\Administrator\Documents\nal\NAL-Portal\Test\pdfform.cshtml Line: 11
Stack Trace:
[InvalidCastException: Unable to cast object of type 'zz93.c3' to type 'zz93.k8'.]
ceTe.DynamicPDF.Merger.Forms.PdfFormField..ctor(hp A_0, PdfForm A_1, Int32 A_2, PdfFormField A_3, k8 A_4) +2174
ceTe.DynamicPDF.Merger.Forms.PdfButtonField..ctor(hp A_0, PdfForm A_1, Int32 A_2, PdfFormField A_3, k8 A_4) +51
ceTe.DynamicPDF.Merger.Forms.PdfFormField.a(hp A_0, PdfForm A_1, Int32 A_2, PdfFormField A_3, k8 A_4) +676
zz93.dr.a(c3 A_0, PdfForm A_1, PdfFormField A_2, hp A_3) +169
ceTe.DynamicPDF.Merger.Forms.PdfFormFieldList.a(hp A_0, PdfForm A_1, PdfFormField A_2, c3 A_3) +137
ceTe.DynamicPDF.Merger.Forms.PdfFormFieldList..ctor(hp A_0, PdfForm A_1, PdfFormField A_2, e1 A_3) +163
ceTe.DynamicPDF.Merger.Forms.PdfForm..ctor(hp A_0, k8 A_1) +402
ceTe.DynamicPDF.Merger.PdfDocument.b(hp A_0) +175
ceTe.DynamicPDF.Merger.PdfDocument.e() +888
[PdfParsingException: There was an error while parsing the PDF file. The PDF is likely corrupt or invalid.]
ceTe.DynamicPDF.Merger.PdfDocument.e() +966
ceTe.DynamicPDF.Merger.MergeDocument..ctor(String filePath) +77
ASP._Page_test_pdfform_cshtml.Execute() in c:\Users\Administrator\Documents\nal\NAL-Portal\Test\pdfform.cshtml:11
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +207
System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +68
System.Web.WebPages.WebPage.ExecutePageHierarchy() +156
System.Web.WebPages.StartPage.RunPage() +19
System.Web.WebPages.StartPage.ExecutePageHierarchy() +65
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +76
System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContext context) +249
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272