locked
Free tool to convert Docx to PDF from MVC application RRS feed

  • Question

  • User1617707200 posted

    Hi,

    I am looking for a solution to display Word document(docx) as a Preview in browser from my MVC application. Now unlike PDF word document cannot be directly open in browser. So I am looking for some alternative ways like converting Docx to either PDF or Html OR any Doc viewer that can get integrated in my app to view docx directly.

    I searched a lot on google and tried many options. there are some tools available for Docx to PDF/Html conversion but they all are paid ones. I am looking for a completely free tool that will work in my MVC app on server(with IIS on AWS VM). Don't want to use Office interop. I tried using WordToPDF.dll from https://www.c-sharpcorner.com/UploadFile/698727/convert-word-file-to-pdf-using-C-Sharp/  link. This tool works fine on my localhost instance. but it is not working on app server. the WordToPDF.dll is copied in the bin folder on app server but still it is not generating the PDF file at specified path. Can anyone suggest what could be the reason for this?

    OR please suggest best solution that will fulfil my requirement. my final goal is to view generated word document (docx) in browser for preview either directly/as a PDF or html

    Thanks.

    Sunday, August 30, 2020 7:19 PM

All replies

  • User1686398519 posted

    Hi Mayurib,

    1. but it is not working on app server.
      • If this WordToPDF.dll uses the com component of Word, it cannot be used after being deployed to IIS. IIS is a non-interactive type of process. The use of WordToPDF conversion may use the word com component, and the word com component needs to be an interactive process when it is used.
    2.  I am looking for a completely free tool
      • Almost most of the conversion of word to pdf requires payment.After deploying to IIS, Syncfusion.DocToPDFConverter.AspNet can convert word to pdf, but it is not free.You can go to github to see if there are free libraries or codes.

    Best Regards,

    YihuiSun

    Monday, August 31, 2020 9:29 AM