How to create a Word document from a Silverlight 4 application?

I'm looking for some options for programmatically creating a Word document from a Silverlight 4 application. I found two approaches that at first seemed promising but didn't look as if they would work.

OpenKML SDK OpenXML SDK is not available for Silverlight at this time.

Word Automation through COM Interoperability

dynamic wordApplication = AutomationFactory.CreateObject("Word.Application"); 

Obviously, this requires that the Silverlight 4 application be allowed to work with elevated privileges, which is only available for applications outside the browser (which we don’t have)

My other thought is to give a request to a server service that does not have these restrictions. I wanted to check out any ideas before taking this path.

+4
source share
2 answers

The ultimate goal is the reverse service. None of the Open XML SDKs (the easy way) or System.IO.Packaging (the tougher way) is available from Silverlight, so server generation is the only real option here. You can do it yourself (which would be my preference) or use tools like OfficeWriter or Sharp Shooter (mentioned in another answer). The positive side of the internal solution is that you will not have anyone who decompiles your Word code using tools like Reflector.

+2
source

Source: https://habr.com/ru/post/1307142/


All Articles