Issue converting PDF TO TIFF

Hi Team,

I am facing a issue while converting multi page PDF file to TIFF image and its throwing the exception.Please help me to fix the issue as soon as possible.Attached the exception snip.

Hi Navaneethan,


Thanks for contacting support.

I have tested the scenario using Aspose.Pdf for .NET 11.2.0 in Visual Studio 2015 running over Windows 8 and I am unable to notice any issue. For your reference, I have also attached the output generated over my end.

[C#]

Aspose.Pdf.Devices.Resolution resol = new Aspose.Pdf.Devices.Resolution(300);<o:p></o:p>

var bgDoc = new Document(@"C:\pdftest\New+folder1.pdf");

Aspose.Pdf.Devices.TiffSettings tiff_settings = new Aspose.Pdf.Devices.TiffSettings();

tiff_settings.Compression = Aspose.Pdf.Devices.CompressionType.None;

tiff_settings.Depth = Aspose.Pdf.Devices.ColorDepth.Default;

tiff_settings.Shape = Aspose.Pdf.Devices.ShapeType.Landscape;

tiff_settings.SkipBlankPages = true;

Aspose.Pdf.Devices.TiffDevice tiff = new Aspose.Pdf.Devices.TiffDevice(resol,tiff_settings);

tiff.Process(bgDoc, "c:/pdftest/TIFF_Resultant.tiff");

Hi Team,

It works with saving the as a tiff file.But if you tried to do the save using the memory stream it throws an exception.Please check my attached screenshot.


Thanks,
Navaneethan V

Hi Navaneethan,


Thanks for sharing the details.

I have again tested the scenario while saving the output in MemoryStream and I am still unable to notice any issue. Can you please share some details regarding your working environment i.e. Operating System, .NET Framework version, which version of API you are using.

We are sorry for your inconvenience.

[C#]

Aspose.Pdf.Devices.Resolution
resol = new Aspose.Pdf.Devices.Resolution(300);<o:p></o:p>

var bgDoc = new Document(@"C:\pdftest\New+folder1.pdf");

Aspose.Pdf.Devices.TiffSettings tiff_settings = new Aspose.Pdf.Devices.TiffSettings();

tiff_settings.Compression = Aspose.Pdf.Devices.CompressionType.None;

tiff_settings.Depth = Aspose.Pdf.Devices.ColorDepth.Default;

tiff_settings.Shape = Aspose.Pdf.Devices.ShapeType.Landscape;

tiff_settings.SkipBlankPages = true;

Aspose.Pdf.Devices.TiffDevice tiff = new Aspose.Pdf.Devices.TiffDevice(resol, tiff_settings);

MemoryStream ms = new MemoryStream();

tiff.Process(bgDoc, ms);

Console.WriteLine(ms.Length);

ms.Close();