Viewer for Word doc within ASPX

Does your product come with a viewer to view document within ASPX page?

Hi,

Thank you for considering Aspose.Words. I would like just to clarify, Aspose.Words is a class library, which allows working with MS Word documents. Aspose.Words does not provide any user interface for viewing or editing documents.

However, it is possible to create Document preview, for example by converting your document to image, XPS or SWF format.

Best regards.

I thought you had a Silverlight viewer, can I not just use that from within an ASPX page?

Hi there,

Thanks for your inquiry. Yes, we have a demo which shows how to render a document and view it in Silverlight here. However, this demo internally just renders the document to XPS which is what Alexey has already suggested.

My suggestion would be to embed the document as a SWF generated by Aspose.Words, this would be the simpliest method.

Thanks,

Do you have an example using the SWF method? I wasn’t able to open the Silverlight example and didn’t see any mention of SWF in the documentation.

Hello,

Thabks for your request.

You can try this code:

License lic = new License();
lic.SetLicense("Aspose.Words.lic");
Document doc = new Document();
Run run = new Run(doc);
run.Text = "Hello from SWF!";
doc.FirstSection.Body.FirstParagraph.Runs.Add(run);
doc.Save("X:\\ out.swf", SaveFormat.Swf);

Hi Giancarlo,

Thanks for your request. You can find a simple example by running any Aspose.Words demo:

https://github.com/aspose-words/Aspose.Words-for-.NET

Just select SWF from the list of the output format.

Also, I provided a simple ASP.NET application that demonstrates how you can display your document using SWF viewer on page here.
https://forum.aspose.com/t/flash-output-brilliant/56761

Hope this helps.

Best regards,

Thanks, I’ll try it out. By the way, your SWF demo (dinner invitation) didn’t work. It takes me to this page when I select SWF:
https://github.com/aspose-words/Aspose.Words-for-.NET

but it is pretty much just a blank ASPOSE web page…

Hi Giancarlo,

Thanks for your inquiry.

Which browser are you using and also which version of Flash do you have installed? Normally there should be a message which appears if your browser does not have the required features but perhaps something has gone wrong.

Thanks,

It didn’t work in Firefox with Flash version 10,2,159,1 installed, however, it worked in IE8 but the page layout (HTML/CSS) was all bad so you could only see part of the player/viewer.

Hello,

Thank you for your inquiry.
I managed to reproduce the problem with Aspose.Words demo SWF output on our site. Indeed, the problem with the mapping of the element on the page. As soon as we fix the problem, we’ll let you know.

Hello,

At the time of playback problems I have had the following components installed.
Internet Explorer 8 (8.0.7600.16385)
Adobe Flash Player 10 (Shockware Flash Object 10.1.51.95)

I updated Flash to version 10.2.159.1. The situation is fixed.
Please try to update Flash Player. https://get.adobe.com/flashplayer/about

I can’t run your Silverlight demo. I’ve added my lic file and installed the Silverlight 3 toolkit. Everything compiles but when it is run I get the following error:
Message: Unhandled Error in Silverlight Application
Code: 2103
Category: InitializeError
Message: Invalid or malformed application: Check manifest

Line: 56
Char: 13
Code: 0

This is actually an error reported via javascript. I found the following regarding the error but don’t see how it applies to my sistuation, maybe you have some insight on how this can be an issue with your demo app.

Hi there,

Thanks for your inquiry. I’m afraid I can’t reproduce the issue on my side. Have you tried following the instructions on the linked page anyway and see if it works?

If it helps, you could try creating a new Silverlight project, import the files and see if the issue dissappears.

Thanks,