In this how-to tutorial, we’ll show you how to convert OTG to PDF in C#. Converting OTG to PDF using C# applications can be done in just a few simple and easy steps with the help of Aspose.Imaging for .NET.
Steps for Converting OTG to PDF in C#
- Install Aspose.Imaging for .NET NuGet package
- Include Aspose.Imaging, Aspose.Imaging.ImageOptions and Aspose.Imaging.FileFormats.Pdf namespaces
- Set Aspose license using Aspose.Imaging.License class
- Load OTG file using Image.Load method
- Set options of PDF file using PdfOptions class
- Set PDF metadata information using PdfDocumentInfo class
- Save output PDF using Save method and PdfSaveOptions
Note that in steps 5 and 6 above, we’re setting information and properties of the output PDF which will be converted from the input OTG graphics file.
Code to Convert OTG to PDF in C#
Using the above snippet, you can easily create your own OTG to PDF converter in C# code in your .NET projects including Windows desktop, ASP.NET web, or console applications.