Multiple Page PDF to Tiff

Dear Support,

I am trying to find an example converting a multiple page PDF to a multiple page tiff file..

The below code only converts the first page..

Aspose.Pdf.Document d = new Aspose.Pdf.Document(filePath);

//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 = 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(d, 1, 1,output.tif");

Please advise

Thank You

Hi Abel,


Thanks for using our products.

As you have been using an overloaded method of TiffDevice.Process(…) where you have provided 1 as first and last page argument, so that’s why only first page is being displayed in resultant TIFF. Please try using the following overloaded method to render all the pages of source PDF document into resultant TIFF image.

tiffDevice.Process(d, @“D:/pdftest/FormField-Border.tif”);

You may consider visiting the following link for further details on Convert all PDF pages to single TIFF Image

In case you still encounter the same problem, please share the source PDF file so that we can test the scenario at our end. We are sorry for your inconvenience.