Unable to cast object of type 'zz93.c3' to type 'zz93.k8'

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v7)  /  Re: Unable to cast object of type 'zz93.c3' to type 'zz93.k8'

DynamicPDF CoreSuite for .NET (v7) Forum

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
I do not believe the pdf is corrupt since I have been able to use another library to fill the form with this same pdf.
Posted by a ceTe Software moderator
Hello,

Can you please send over the following details to our support team at: support@cete.com so that they can look into it further?

1.Input PDF document using which you are getting error.
2.Exact version and build number of the DynamicPDF dll file.

Thanks,
ceTe software Support Team.
Posted by a ceTe Software moderator
Hello,

The above exception was reported in DynamicPDF Merger for .NET v7.0 and has been fixed in the latest build of v7 which is available for download.

Please note that this thread was initially posted under Merger for .NET v4.0 and has been moved to v7.0 forum.

Thanks,
ceTe Software Support Team.
Thank you for the quick response. The fix worked for me.
I am having this problem on dynamic pdf 9.0.0.35070 today
Posted by a ceTe Software moderator
Hello,

Please send over the following details to support@cete.com so we can look into it further.

1.        Input/source PDF using which you are getting error.
2.        Code sample which uses static data to recreate the error.
3.        Full error message along with the stack trace.
4.        Version and build number of the DynamicPDF DLL file used in the application.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 10:20 PM.