Pdf to Tiff Conversion throws Arithmetic operation resulted in an overflow

Hi Team,
I am facing one issue regarding conversion of pdf to tiff. While running application and converting file from Pdf to Tiff I am getting exception message “Arithmetic operation resulted in an overflow…” . I am using Aspose.Pdf version 18.5.0.0

File is attached as given below. Please check and confirm.
WP-d9bcf4be-fdeb-4ce6-896f-615fb00b5b8f.pdf (304.0 KB)

Regards,
ANKESH GAMIT
2019-07-10

@gamitankesh

Thank you for contacting support.

We have used below code snippet with Aspose.PDF for .NET 19.7 and the TIFF image is generated fine. Would ensure using latest version and feel free to get back to us if you need any further assistance.

// Open document
Document pdfDocument = new Document(dataDir + "WP-d9bcf4be-fdeb-4ce6-896f-615fb00b5b8f.pdf");

// Create Resolution object
Resolution resolution = new Resolution(300);

// Create TiffSettings object
TiffSettings tiffSettings = new TiffSettings();
tiffSettings.Compression = CompressionType.None;
tiffSettings.Depth = ColorDepth.Default;
tiffSettings.Shape = Aspose.Pdf.Devices.ShapeType.Landscape;
tiffSettings.SkipBlankPages = false;

// Create TIFF device
TiffDevice tiffDevice = new TiffDevice(resolution, tiffSettings);

// Convert a particular page and save the image to stream
tiffDevice.Process(pdfDocument, dataDir + "AllPagesToTIFF_19.7.tif");

You may also visit Convert PDF Pages for your kind reference.