Let us learn how to convert an image to PDF with the same height and width of the page. Create your icons file with 16px, 32px, 64px, 128px or 256px size. Let us proceed to explore this feature: Convert Image to PDF with Same Page Height and WidthĬontinuing this example from the above use case, as you can notice bigger page size in the above screenshot. Convert any image into ico format (icons for Microsoft Windows) Easily and directly online. NET API allows you to control page dimensions and margin that help you create exactly the same size PDF as of the image dimensions. However, in this screenshot, you can notice that the image is converted to a PDF page, but, default page dimensions and margins are applied in the output PDF document. The code snippet below shows how to convert JPG Image to PDF using C#:īelow is the screenshot of JPG conversion to PDF: You can easily convert a JPG image to PDF by following steps: Let us move on to explore different use cases: Convert JPG to PDF with C# So the API has been installed successfully by now. You can either download it from Releases section, or via the NuGet Gallery with the following command: Install-Package Aspose.Pdf -Version 20.9.0 This is a chart for px to size conversion results at 300 ppi. We will be performing these image formats to PDF conversion using Aspose.PDF for. To convert pixels to size in millimeters use this converter: Millimetres Pixels (25.4/Resolution) The best way to convert pixel to size is using the online automatic converter, because it is fast, free and accurate. Convert Image to PDF with Same Page Height and Width in C#Ĭ# Image to PDF Converter API – Installation.JPG, PNG, TIFF, EMF, and BMP to PDF Converter API – Installation.The following are the installation steps and a few of the possible use cases for converting images: In this article, we will be learning to convert JPG, PNG, TIFF, EMF, WMF, and BMP images to PDF conversion using C# or VB.NET. Images to PDF conversion is an important and useful scenario for file processing applications.