Conversión de Microsoft Word a PDF del lado del cliente: ¿cómo hacerlo en MVC3?

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?

preguntado el 01 de febrero de 12 a las 04:02

Are you saying you want the user to upload a .doc/.docx, convert it to pdf, then show the user the pdf? -

1 Respuestas

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 (commercial 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.

Respondido 01 Feb 12, 11:02

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.