javascript - Client-side Microsoft Word to PDF conversion - how to in MVC3? - Stack Overflow

I have a file upload control on my page. When a user selects a .DOCDOCX file in the control, I need to

I have a file upload control on my page. When a user selects a .DOC/DOCX file in the control, I need to show the selected file on the page but in PDF format.

I can show the PDF using embed tag as usual, but what should be the sequence be that I need to follow here?

I am using ASP.NET MVC3. Can I perform this using javacript?

I have a file upload control on my page. When a user selects a .DOC/DOCX file in the control, I need to show the selected file on the page but in PDF format.

I can show the PDF using embed tag as usual, but what should be the sequence be that I need to follow here?

I am using ASP.NET MVC3. Can I perform this using javacript?

Share Improve this question edited Feb 1, 2012 at 8:41 Stafford Williams 9,8069 gold badges54 silver badges105 bronze badges asked Feb 1, 2012 at 4:33 Red SwanRed Swan 15.6k44 gold badges161 silver badges241 bronze badges 1
  • Are you saying you want the user to upload a .doc/.docx, convert it to pdf, then show the user the pdf? – Stafford Williams Commented Feb 1, 2012 at 4:38
Add a ment  | 

1 Answer 1

Reset to default 4

Converting a DOCX file to PDF using javascript might be a little tough and a territory I wouldn't venture into. So once the file is being uploaded on the server you could use some standard library that will perform the conversion. There are some libraries such as Aspose.Words (mercial but very reliable) or DocX (free) which will allow you to do this. Once the file is converted into a PDF you could store it on the server and return its location so that the client can build an <iframe> or <object> tag dynamically pointing to it and show it inline as a preview.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745142315a4613485.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信