I was wondering if there is a way to convert multiple JPG images to a single PDF.
Atm we are scanning in batch and the output for every page is a JPG. Its a high quality JPG with 2480 x 3478 resolution. The images are usually between 500 and 1000kb.
Atm I’m using standard .NET code to convert all the JPG’s to one multipage tiff. I then convert the multipage tiff to PDF with Aspose.Words. I’m testing it with 3 images atm. (600kb, 600kb and 800kb).
Now the problem is that my output is huge. The PDF itself is fine and has all the pages nicely put together. However its about 22MB in size. When I create a Physical file from the multipage tiff the tiff is actually 40MB in size. so the conversion almost cuts that in half but its still huge. It looks like the problem is with the conversion to multi tiff before I go to PDF.
So I was wondering if there was a way to skip this step and merge the multiple JPG’s to a single PDF directly using Aspose.Words.
Thanks in advance
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Loop through all the images
for (int i = 0; i < images.Count; i++)
PageSetup ps = builder.PageSetup;
ps.PageWidth = ConvertUtil.PixelToPoint(images[i].Width, images[i].HorizontalResolution);
ps.PageHeight = ConvertUtil.PixelToPoint(images[i].Height, images[i].VerticalResolution);
// Insert one image per page, positioned at top left corner of document
// To prevent extra page break at the end of document
if (i < images.Count - 1)
// Save Aspose.Words document to PDF format