PageHandler not working...!

Hello:
I’ve tried the Aspose Word Viewer. The example given in the demo project. It’s working fine. It has got a HTML image control which calls DocumentPageHandler.ashx, it calls DocumentPageHandler.cs. This class creates a blank image at the beginning and displays a doc file as an image when Upload button is created.

public void ProcessRequest(HttpContext context)
{
    //...........................
}
public bool IsReusable
{
    //...........................
}
private Bitmap GetErrorBitmap()
{
    //...........................
}

My problem is i’m not using a page rather a user control and wrote the same code. My control inherits a class named
ModuleControl which inherits

public class ModuleControl : UserControl
{
    //.........................
    protected override void OnPreRender(EventArgs e) //OnInit(EventArgs e)
    {
        base.OnPreRender(e);
        Trace.Write("Begin CustomizeControl()");
        CustomizeControl();
        Trace.Write("End CustomizeControl()");
    }
}

But after this DocumentPageHandler.cs never called. As a result i can’t see the doc file inside the viewer. It loads the file but can’t load the image. I can see the no of pages and it move one page to another.
I’m quite unfamiliar with the page handler technique. So, I can’t understand where should i’ve to call it in this scenario.
I need help.
Thnx-
Razin

Hi

Thanks for your request. Please note, that Aspose.Words.Viewer is currently in beta and cannot be relied upon for use in serious applications. It included into Aspose.Words for unofficial demonstration purpose only. We are also not providing any support for it as we are currently preparing the new, completely reworked, document rendering engine.
https://docs.aspose.com/words/net/rendering/
Best regards.

Hello:
Thanks for your suggestion. But I don’t think my problem is related with Aspose Viewer rather PageHandler. When I use a page (.aspx) the PageHandler works fine and render the doc as an image in the HTML image control. But when I use a user control (.asmx) it doesn’t work. So, can you please tell me how can I invoke the PageHandler when I use UserControl.
Thnx-
Razin

I made it.
Thanx-
Razin

We are happy to tell you that the new Rendering Engine has replaced the “old Viewer Beta”. The Rendering Engine can print, save as images or draw onto .NET Graphics object any document page.

Please see Aspose.Words documentation to learn more about new features.

Saving to image

In additional, new Rendering engine allows you to convert Word document to PDF directly (without using Aspose.Pdf).

Saving to Pdf

The latest version of Aspose.Words is available for download from downloads section or from NuGet