Convert RTF file to PDF in azure app server RRS feed

  • Question

  • Hi Team,
    I've an application where i need to convert RTF file to PDF file format.In my local machine the conversion take place with out any issues .i have MS office installed in my local machine .Technology stack what is used in local machine :Windows 10, .Net framework 6.2, Asp.net 

    When i deploy the same application in Azure app server it throws me an error the conversion fails.
    In Azure app server we don't have the ms office installed so how can i enable MS office dll in azure app server ?
    Any insights on this will be great 


    Tuesday, September 8, 2020 7:24 AM

All replies

  • Hi KumarRaj5,
    The Visual C# forum discusses and asks questions about the C# programming language, IDE, libraries, samples, and tools, it does not involve Azure. 
    It is recommended to ask the question on the Microsoft Q&A forum and you can get more professional answer.
    Thank you for your understanding.
    Best Regards,
    Daniel Zhang

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, September 8, 2020 8:10 AM
  • You need to install ms office to use the office dll, or you can use some third party dlls to achieve the conversion. The following example is based on Spire.Doc.dll, you can give it a try:

    Document doc = new Document();
    doc.LoadFromFile(@"test.rtf", Spire.Doc.FileFormat.Rtf);
    ToPdfParameterList ps = new ToPdfParameterList();
    ps.UsePSCoversion = true;
    doc.SaveToFile(@"output.pdf", ps);
    Hope it's helpful.

    • Edited by Jamesbn Wednesday, September 9, 2020 3:42 AM
    Wednesday, September 9, 2020 3:30 AM