C#/VB.NET: Convert ODP to PDF

2022-07-28 01:00:47 Written by  support iceblue
Rate this item
(0 votes)

An ODP file is an OpenDocument Presentation file consisting of slides containing images, text, media, and transition effects. Since ODP files can only be opened by specified programs such as OpenOffice Impress, LibreOffice Impress, and Microsoft PowerPoint, if you want your ODP files to be viewable on more devices, you can convert them to PDF. In this article, you will learn how to programmatically convert a ODP file to PDF using Spire.Presentation for .NET.

Install Spire.Presentation for .NET

To begin with, you need to add the DLL files included in the Spire.Presentation for.NET package as references in your .NET project. The DLL files can be either downloaded from this link or installed via NuGet.

PM> Install-Package Spire.Presentation

Convert OpenDocument Presentation to PDF

The detailed steps are as follows:

  • Create a Presentation instance.
  • Load an ODP file using Presentation.LoadFromFile() method.
  • Save the ODP file to PDF using Presentation.SaveToFile(String, FileFormat) method.
  • C#
  • VB.NET
using Spire.Presentation;

namespace ODPtoPDF
{
    class Program
    {
        static void Main(string[] args)
        {
            //Create a Presentation instance
            Presentation presentation = new Presentation();

            //Load an ODP file
            presentation.LoadFromFile("Sample.odp", FileFormat.ODP);

            //Convert the ODP file to PDF
            presentation.SaveToFile("OdptoPDF.pdf", FileFormat.PDF);

        }
    }
}

C#/VB.NET: Convert ODP to PDF

Apply for a Temporary License

If you'd like to remove the evaluation message from the generated documents, or to get rid of the function limitations, please request a 30-day trial license for yourself.

Additional Info

  • tutorial_title:
Last modified on Thursday, 28 July 2022 01:04