Saturday, 15 August 2015

c# - Export word with Print Layout from .mhtml in MVC -



c# - Export word with Print Layout from .mhtml in MVC -

i exporting word document images converted .mhtml file. referred below link exporting word.

http://www.revium.com.au/articles/sandbox/aspnet-mvc-convert-view-to-word-document/

now word getting exported in web layout. need document in print layout.

can help me solving issue.

edited

i solved issue help of below link

http://forums.aspfree.com/asp-development-5/open-ms-word-documents-print-layout-view-57860.html

you can reverse engineer it. open doc in word. way want , save html. open text editor , utilize need.

that do.

<head> <meta http-equiv=content-type content="text/html; charset=us-ascii"> <meta name=progid content=word.document> <meta name=generator content="microsoft word 9"> <meta name=originator content="microsoft word 9"> <title></title> <!--[if gte mso 9]><xml> <o:documentproperties> </o:documentproperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:worddocument> <w:view>print</w:view> </w:worddocument> </xml><![endif]--> </head>

i added code generated word got correctly.

hope help facing same issue.

write file response base, bytes stream , seek that. should forcefulness download of file

httpresponsebase.outputstream(filebytes,0,filebytes.getlength(0));

c# asp.net-mvc ms-word export

No comments:

Post a Comment