Convert GIF Images to PDF in C#

gif to pdf c#

PDF has become one of the ruling document formats nowadays. The cross-platform support has made PDF a universal format. Therefore, various documents or images are converted to PDF before they are shared or exchanged. In this article, you will learn how to perform GIF to PDF conversion from within your C# applications. The article will also cover how to customize GIF to PDF conversion in various cases.

Info: Aspose recently developed a FREE Text to GIF Converter.

C# GIF to PDF Converter API

Aspose.Imaging for .NET is a feature-rich image processing API that lets you process and convert a wide range of image formats. Particularly, the API provides a high fidelity conversion of GIF images to PDF format. You can either download the API or install it using NuGet.

PM> Install-Package Aspose.Imaging

Convert GIF to PDF using C#

The following are the steps to convert a GIF image to PDF using Aspose.Imaging for .NET.

The following code sample shows how to convert GIF to PDF using C#.

GIF to PDF

Convert Specific Frames of GIF to PDF in C#

You can also convert the specific frames from GIF to PDF. The following are the steps to perform this operation.

The following code sample shows how to convert specific frames of GIF to PDF using C#.

Set Page Size in GIF to PDF Conversion

Aspose.Imaging for .NET also allows you to set the dimensions of the page in the converted PDF file. The following are the steps to perform this operation.

The following code sample shows how to set page size in GIF to PDF conversion.

Set Document Info in GIF to PDF Conversion

PDF format supports setting additional information about a document such as author, keywords, subject, and title. Using Aspose.Imaging for .NET, you can set these properties in GIF to PDF conversion. The following are the steps to set document information for the converted PDF file.

The following code sample shows how to set document information in GIF to PDF conversion using C#.

Get a Free API License

In case you want to try the API without evaluation limitations, you can get a free temporary license.

Conclusion

In this article, you have learned how to convert GIF images to PDF documents using C#. Furthermore, you have seen how to convert specific frames of the GIF image and set page size or document information of converted PDF files. You can explore more about the C# image processing API using documentation. In case you would have any questions or queries, contact us via our forum.

See Also