You must Sign In to post a response.
  • Category: ASP.NET

    How to convert PPT to PDF in ASP.NET without using 3rd party dlls?

    I want to convert PPT to PDF .When i googled,i found many articles but most of them are using 3rd party dlls which have free trial for 30 days only and need to pay money for full version.I need code which converts PPT to PDF without using these type of dlls.

    Request you to provide me code with full version open source dlls without using free trial versions to convert PPT to PDF.
  • #767186

    You can add the following dll and build the code as you want, "Microsoft.Office.Interop.PowerPoint.dll" this is Microsoft dll, no need to pay money you can download and add it in to your project bin folder, refer below path for more details.

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #767187
    Make sure that you have Microsoft office 7 installed on your machine.
    Add reference of Microsoft Excel 15.0 Object Library from COM tab to your solution.
    Add reference of Microsoft.Office.Interop.PowerPoint 12.0 Library to your solution.
    Now try this code:

    using Microsoft.Office.Interop.PowerPoint;

    protected void Page_Load(object sender, EventArgs e)
    string szInputFile = @"D:\XYZ\PPTFile.pptx";
    string szOutputFile = @"D:\XYZ\DemoPDF.pdf";
    int Errors = 0;
    Microsoft.Office.Interop.PowerPoint._Application objPPApp = null;
    Presentation objPPDoc = null;
    objPPApp = new Application();
    objPPDoc = objPPApp.Presentations.Open(szInputFile);
    objPPDoc.SaveAs(szOutputFile, PpSaveAsFileType.ppSaveAsPDF);
    catch (Exception ex)
    if ((objPPDoc != null))
    objPPDoc = null;
    if ((objPPApp != null))
    objPPApp = null;

  • #767191
    As others suggested, you can use office interop to convert ppt to pdf, but it requires you to install PowerPoint on system. Apart from it, there are some other alternative ways, such as use some free libraries which do not need you to install PowerPoint. You can use this free one if your document is not huge:


  • #767219
    Use Interop libraries to convert it to PDF or you can below link ,This is a C # example to convert PPT (PPTX) files into PDF under .Net using MS Office Automation via a free C# PDF library. Only the .Net platform, installed package of MS Office and nothing else.

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

Sign In to post your comments