Convert of word file(.docx & doc) to .pdf using c# is not working

前端 未结 3 1748
心在旅途
心在旅途 2021-01-03 08:48

I am using visualstudio 2010 and I am trying to convert word.docx file to .pdf file and is working fine in local but on run time on server it is showing error as

<         


        
3条回答
  •  攒了一身酷
    2021-01-03 09:11

    I had long been looking for a solution to these issues and in the end I had to use a third party. I suggest you use a third party like Aspose Aspose.Total for .NET

    Aspose.Words for .NET is an advanced class library for .NET that enables you to perform a wide range of document processing tasks directly within your .NET applications.

    With Aspose.Words you can generate, modify, convert, render and print documents without using Microsoft Word.

    Aspose.Words for .NET supports DOC, OOXML, RTF, HTML, OpenDocument, PDF, XPS, EPUB and many other formats.

    This component work perfectly for me and very simple to use. this is an example of convert word to pdf code :

    Document doc = new Document(getMyDir() + "Document.doc");
    doc.save(getMyDir() + "Document.Doc2PdfSave Out.pdf");
    

提交回复
热议问题