简体   繁体   中英

Convert DOC to PDF Without Interop or Aspose in C# code

I need to convert a document .doc to .pdf without using Microsoft Interop or Aspose cause this code using a licence(Aspose) or need to have Microsoft Office in server(Interop).

How can I do it? Is that possible?

From your question I guess you want the conversion to be done on the server side (you mentioned Aspose.net).

I searched for tens if not hundreds of libraries, and could not find something, free, for commercial use, that has similar or better quality results then the pricey Aspose.

That said, you can get decent results for simple documents, using OpenOffice or better yet, LibreOffice .

Once installed, you can invoke a command line exe with parameters to do the conversion.

soffice --headless --convert-to pdf filename.doc

For more information you can either google it, or, if all else fails, read the documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM