We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

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.

http://www.aspose.com/Products/Aspose.Words/Api/ViewerUnderDevelopment.html

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

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

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.

SaveToImage method renders document pages into images:

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/aspose.words.document.savetoimage_overloads.html

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

SaveToPdf method converts the whole document or selected pages to PDF.

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/aspose.words.document.savetopdf_overloads.html

The latest version of Aspose.Words is available for download from here:

http://www.aspose.com/community/files/51/file-format-components/aspose.words/entry158153.aspx

Best regards,