Create PDF from images, combine multiple images into a single PDF document.

Convert single page images to PDF file in server side, support batch convering mix format images to PDF in asp programming, such as converting jpeg and png to PDF.

Convert multiple pages tiff to PDF in windows servers, each tiff page will be rendered as PDF page.

PageSize is a optional parameter (such as A4, B3, Letter), if not set, the converted PDF page will be drawn with original image size. C# code demo is shows in the following aspx.cs class, so you can find it's easy to deploy the code to your servers.


Convert Single Page Image to PDF in ASP.NET
// Input a list of images from servers, support jpeg, png, tif, bmp and gif
List<Image> images = new List<Image>();
images.Add(Image.FromFile("Test.bmp"));
images.Add(Image.FromFile("Test.png"));
images.Add(Image.FromFile("Test.gif"));
images.Add(Image.FromFile("Test.jpg"));
images.Add(Image.FromFile("Test.tiff"));

// Bacth convert images to pdf document, all the images will be drawn in input order.
PdfDocument document = PdfDocument.ConvertToPdf(images);

// Save and show the document
document.Save("FromImage.pdf");
Process.Start("FromImage.pdf");

Convert Multiple Pages Tiff to PDF in ASP.NET
// Import a list of tiff images from server side
List<Image> images = new List<Image>();
images.Add(Image.FromFile("multipage.tiff"));

// Transform multi-pages tiff to pdf file.
PdfDocument document = PdfDocument.ConvertToPdf(images);

// Save and show the document
document.Save("multipage.pdf");
Process.Start("multipage.pdf");