We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Converting Excell workbook to Tif with specific dimension

Hi Support,

Can you please provide me with a code sample to convert an excel workbook to tiff with dimensions width 1728pixels x height 2320 pixels, resolution : 300dpi, Compression CCITT4. Need this urgently.

Clive

Hi,


Please see a sample code for your reference:

Workbook wb = new Workbook(“e:\test2\MyFile.xls”);
ImageOrPrintOptions tiffOptions = new ImageOrPrintOptions();
tiffOptions.HorizontalResolution = 300;
tiffOptions.VerticalResolution = 300;
tiffOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Tiff;
tiffOptions.TiffCompression = Aspose.Cells.Rendering.TiffCompression.CompressionCCITT4;
WorkbookRender bookRender = new WorkbookRender(wb, tiffOptions);
bookRender.ToImage(“e:\test2\outputimg.tiff”);

Also check the article, e.g
http://docs.aspose.com/display/cellsnet/Converting+Worksheet+to+Image+using+ImageOrPrint+Options


Thank you.