Is Aspose.HTML compatible with Kendo


We are trying to convert web page to pdf file. web page is having Kendo grid as well as pdf attachment. Is Aspose.HTML compatible with Kendo? Also can we convert page to PDF along with attachment using Aspose.HTML?



Thank you for contacting support.

Would you please share respective sample files with us so that we may investigate further to help you out.

        string Resultant_output =  "simple-any-page_out.pdf";
        Aspose.Html.Rendering.Pdf.PdfRenderingOptions pdf_options = new Aspose.Html.Rendering.Pdf.PdfRenderingOptions();
        pdf_options.PageSetup.AnyPage = new Aspose.Html.Drawing.Page(new Aspose.Html.Drawing.Size(400, 100));
        using (Aspose.Html.Rendering.Pdf.PdfDevice pdf_device = new Aspose.Html.Rendering.Pdf.PdfDevice(pdf_options, Resultant_output))
        using (Aspose.Html.Rendering.HtmlRenderer renderer = new Aspose.Html.Rendering.HtmlRenderer())
        using (Aspose.Html.HTMLDocument html_document = new Aspose.Html.HTMLDocument(@"http://localhost:1234/xyz/Details/1234"))
            // Render the output using HtmlRenderer
            renderer.Render(pdf_device, html_document);


we are just passing url of the actual web page which needs to be converted to PDF. But code which is shared throwing exception at below line

renderer.Render(pdf_device, html_document);

Exception Details

[NullReferenceException: Object reference not set to an instance of an object.]
​ .(​ ) +146
.(​ , ​ , ICSSStyleSheet ) +161
.(​ , ICSSStyleSheet ) +1627
.(​ , Boolean , ICSSStyleSheet ) +219
.( , ICSSStyleSheet ) +58
.( ) +340
. (String ) +64
. (String , Node ) +338
. (Node , String ) +24
Aspose.Html.HTMLLinkElement.() +154
System.Lazy1.CreateValue() +411 System.Lazy1.LazyInitValue() +152
System.Lazy1.get_Value() +75 Aspose.Html.HTMLLinkElement.get_Sheet() +9 .AcceptNode(Node ) +37 .(Node ) +76 .NextNode() +93 .MoveNext() +11 .MoveNext() +11 ..ctor(Document ) +214 Aspose.Html.HTMLDocument.get_StyleSheets() +34 .(String ) +222 . () +62 . () +17 ​ .(RenderingOptions , Document ) +124 ​ .(RenderingOptions , Document ) +47 . (IDevice , ) +40 .() +71 .MoveNext() +24 .​ (Renderer , [] , IDevice ) +283 Aspose.Html.Rendering.HtmlRenderer.Render(IDevice device, Document[] documents) +371 Aspose.Html.Rendering.HtmlRenderer.Render(IDevice device, Document document) +51 lambda_method(Closure , ControllerBase , Object[] ) +96 System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) +157
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +27 System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +22 System.Web.Mvc.Async.WrappedAsyncResult2.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32 System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +50 System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +228 System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34 System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +26 System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +100 System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27 System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36 System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +12 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +22
System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26 System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10 System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9749277
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +159



Thank you for sharing further details.

We can not reproduce the issue because we do not have access to the page which exists on your local host. Can you please save the web page locally and then share it with us as a single zipped file so that we may try to reproduce and investigate it in our environment.


It will be a little difficult to provide current code since we are binding data to Kendo grid from database. We will try to provide sample files which having Kendo grid and pdf attachments

Before that could you please let us know that if Aspose.HTML is compatible with KendoUI or not? In one of your forum topic it is mentioned that Aspose.PDF is not compatible with Kendo. Is it the same case for Aspose.HTML ?



Please take all the time you need and get back to us as per your convenience. We need to perform some detailed investigations to check if this 3rd party library is supported by Aspose.HTML for .NET or not. Therefore, an investigation ticket with ID HTMLNET-1474 has been logged in our issue management system. We will let you know as soon as some significant update will be available.


any update on ticket HTMLNET-1474 ?



Sorry for the delayed response.

We would like to share with you that investigation against logged ticket has already been started. However, initial investigation of the ticket revealed that we need to refactor JavaScript module of our API before adding support for rendering Kendo UI. Please note that mentioned support will take time to be added in API as it includes refactoring of API modules. We cannot promise for any reliable ETA but, as a rough estimate the task is expected to be completed in next year.

Furthermore, please also note that the ticket is logged under free support model and has low priority. You can definitely consider escalating it to next level by using our paid support support option where issues are resolved on urgent basis. As soon as we have some definite updates regarding resolution of the issue, we will share with you. Please spare us little time.

We are sorry for the inconvenience.