Rank: Newbie Groups: Member
Joined: 10/1/2012 Posts: 8
|
Trying to move the aspxtopdf control into my own user control combined with a button.
Getting the following error after I call render
[ArgumentNullException: Value cannot be null. Parameter name: type] System.Activator.CreateInstance(Type type, Boolean nonPublic) +9640310 System.Activator.CreateInstance(Type type) +6 EO.Web.Internal.dg.a() +28 EO.Web.ASPXToPDF.a(String A_0, Stream A_1) +74 EO.Web.Internal.ms.a(b[] A_0) +109 EO.Web.Internal.a.Close() +61 System.Web.HttpWriter.Filter(Boolean finalFiltering) +184 System.Web.HttpResponse.FilterOutput() +119 System.Web.ApplicationStepManager.ResumeSteps(Exception error) +506 System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +247 System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +417
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
You should not do that. You can only have one ASPXToPDF control in your page. You can put ASPXToPDF in the outer page, but use "ASPXToPDF.Instance" to reference the only ASPXToPDF control in your user control code.
Thanks!
|
Rank: Newbie Groups: Member
Joined: 10/1/2012 Posts: 8
|
eo_support wrote:Hi,
You should not do that. You can only have one ASPXToPDF control in your page. You can put ASPXToPDF in the outer page, but use "ASPXToPDF.Instance" to reference the only ASPXToPDF control in your user control code.
Thanks!
I only have one ASPXToPDF control on the page - just encapsulated within my own user control along with a button to elminate duplicate code on multiple pages (doing essentially the same work in before and after render)
|
Rank: Newbie Groups: Member
Joined: 10/1/2012 Posts: 8
|
So will the ASPXtoPDF control just not work in a user control at all - is that what you are telling me?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
MGE wrote:So will the ASPXtoPDF control just not work in a user control at all - is that what you are telling me? No. That's not what we are saying. We do not know why it fails for you and it works fine at here. Can you try to isolate the problem into a test project and send the test project to us? We can take a look once we have that. Please let us know once you have the test project so that we can let you know where to send it. Thanks!
|
Rank: Newbie Groups: Member
Joined: 10/1/2012 Posts: 8
|
eo_support wrote:MGE wrote:So will the ASPXtoPDF control just not work in a user control at all - is that what you are telling me? No. That's not what we are saying. We do not know why it fails for you and it works fine at here. Can you try to isolate the problem into a test project and send the test project to us? We can take a look once we have that. Please let us know once you have the test project so that we can let you know where to send it. Thanks! When I put it on a new 'blank' page it works fine - this would seem to indicate another control on my original test page is conflicting - would microsofts ajax tab container/ tab panel be at fault? Seems to me I have seen elswhere in the forums where ajax controls were to blame for similar errors to mine own. I will slowly add other controls to the page to see if I can track it down for sure.
|
Rank: Newbie Groups: Member
Joined: 10/1/2012 Posts: 8
|
Got a chance to dig into this again today for a bit - appears the asp webforms Chart control on the page appears to be the likely culprit, going to keep digging to see if I can understand why exactly.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
OK. Please keep us updated when you find anything.
Thanks!
|
Rank: Newbie Groups: Member
Joined: 10/1/2012 Posts: 8
|
As a temp work around I put the charts inside a panel and added the panel to HtmlToPDF.Options.Invisible elements and got Server Error in '/' Application.
System.ArgumentNullException: Value cannot be null. Parameter name: input at System.Text.RegularExpressions.Regex.Match(String input) at System.Text.RegularExpressions.Regex.Match(String input, String pattern, RegexOptions options) at EO.Pdf.Internal.de.a(HtmlToPdfOptions A_0, String A_1, Boolean A_2) at EO.Pdf.Internal.de.b(HtmlToPdfOptions A_0, String A_1, Boolean A_2) at EO.Pdf.Internal.de.a(br A_0) at EO.Pdf.Internal.lq.c.a(Byte[] A_0)
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.Exception: System.ArgumentNullException: Value cannot be null. Parameter name: input at System.Text.RegularExpressions.Regex.Match(String input) at System.Text.RegularExpressions.Regex.Match(String input, String pattern, RegexOptions options) at EO.Pdf.Internal.de.a(HtmlToPdfOptions A_0, String A_1, Boolean A_2) at EO.Pdf.Internal.de.b(HtmlToPdfOptions A_0, String A_1, Boolean A_2) at EO.Pdf.Internal.de.a(br A_0) at EO.Pdf.Internal.lq.c.a(Byte[] A_0)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Exception: System.ArgumentNullException: Value cannot be null. Parameter name: input at System.Text.RegularExpressions.Regex.Match(String input) at System.Text.RegularExpressions.Regex.Match(String input, String pattern, RegexOptions options) at EO.Pdf.Internal.de.a(HtmlToPdfOptions A_0, String A_1, Boolean A_2) at EO.Pdf.Internal.de.b(HtmlToPdfOptions A_0, String A_1, Boolean A_2) at EO.Pdf.Internal.de.a(br A_0) at EO.Pdf.Internal.lq.c.a(Byte[] A_0)] EO.Pdf.Internal.a.b(BinaryReader A_0) +135 EO.Pdf.Internal.lq.a(a A_0) +1683 EO.Pdf.HtmlToPdfSession.a(a A_0) +153 EO.Pdf.HtmlToPdfSession.a(j0 A_0, String A_1, String A_2, Int32 A_3, Int32 A_4) +173 EO.Pdf.HtmlToPdfSession.a(j0 A_0, String A_1, String A_2) +48 EO.Pdf.HtmlToPdfSession.LoadHtml(String html) +45 EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options) +152 EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc) +45
[TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0 System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +251 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28 System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19 EO.Web.Internal.dg.a(String A_0, Object A_1) +128 EO.Web.ASPXToPDF.a(String A_0, Stream A_1) +101 EO.Web.Internal.ms.a(b[] A_0) +109 EO.Web.Internal.a.Close() +61 System.Web.HttpWriter.Filter(Boolean finalFiltering) +184 System.Web.HttpResponse.FilterOutput() +119 System.Web.ApplicationStepManager.ResumeSteps(Exception error) +506 System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +247 System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +417
Any thoughts on why that might be? Do I also need to fill in the visibleelements property or will it take everything else?
I am guessing my best bet now is start a new blank project and reproduce the charts issue and send the project to you? I haven't been able to figure out why when I move the aspxtopdf control to my own user control that the charts no longer render properly (would it have anything to do with my control being in a 'Controls' folder?)
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Yes. That would be the best way. We do not really know what to tell you unless we are able to see and debug into the issue. So please let us know when you have the test project ready so that we can tell you where to send it.
Thanks!
|
Rank: Newbie Groups: Member
Joined: 10/1/2012 Posts: 8
|
Unfortunately I have been unable to reproduce so far and I have implemented my user control on a couple of other pages in the same app without issue - I will keep trying to reproduce - there is something very specific about this one page that is failing that must be causing this
|