Pdf to tiff image generates massive size of tiffs (more than 50 Mb)

Hello Team,

We recently purchased an aspose license for the PDF product. We are converting the pdf pages to tiff images. We don’t have any issues if the pdf page file size is in (8.5 X 11 or 8.5 X 14). If the pdf contains the scanned images (such as from phone), the pdf file size is image.png (5.9 KB) the following , that’s when we are seeing the tiff files in huge size (more than 50 Mb). Any help would be appreciated?

Thanks,
Dinesh

@dkanbazhagan

Could you please attach your input PDF along with code example that you are using here for testing? We will investigate the issue and provide you more information on it.

I have redacted the PII data, the file size went upto 24 MB. But actual file size is 2.5Mb.
https://drive.google.com/drive/folders/1KZPWDn19LGOkt6yTpUbiFfiV_VpYmLxQ?usp=sharing

Please find the below code used here:

Dictionary<string, Stream> convertedTiffFiles = new();
using var memStream = new MemoryStream();
using var pdfDocument = new Document(pdfStream);
var tiffDevice = new TiffDevice();
for (int i = 1; i <= pdfDocument.Pages.Count; i++)
{
var name = “tiffFileName” + “" + pdfDocument.Pages.Count + "” + i + “.tif”;
Stream stream = new MemoryStream();
tiffDevice.Process(pdfDocument, i, i, stream);
convertedTiffFiles.Add(name, stream);
}
foreach (var (fileName, tiffPageStream) in convertedTiffFiles)
{
tiffPageStream.Position = 0;
var file = new FileStream($@“{Environment.CurrentDirectory}/{fileName}”, FileMode.Create,
FileAccess.ReadWrite);
await tiffPageStream.CopyToAsync(file);
}

@dkanbazhagan

We have logged this problem in our issue tracking system as PDFNET-52676. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Any update on this?

@dkanbazhagan

If you multiply the image size by the number of bytes per point and you get 138 million bytes. Without reducing the resolution and without using compression, the file size will be large. It is expected behavior.