Hi Support,
When using the current version of aspose Pdf file version 8.8.0.0 product version 2014.01.01 using the following code, the conversion fails. I have attached the pdf file I am trying to convert. The problem seems to be the A4 page size that it doesn’t like.
Code :
Aspose.Pdf.PageSize pgsize = Aspose.Pdf.PageSize.A4;
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(pdfFullPath);
Aspose.Pdf.Devices.Resolution deviceresolution = new Aspose.Pdf.Devices.Resolution(300);
Aspose.Pdf.Devices.TiffSettings tiffSettings = new Aspose.Pdf.Devices.TiffSettings();
tiffSettings.Depth = Aspose.Pdf.Devices.ColorDepth.Format8bpp; //.Format4bpp; //.Format1bpp; //.Default; //.Format8bpp;
//The conversion has to be set to None to retain the image quality
//The compression will be set in the AdjustTiff into CCITT4
tiffSettings.Compression = Aspose.Pdf.Devices.CompressionType.None; //CompressionType.CCITT4;//.CCITT4;
tiffSettings.Shape = Aspose.Pdf.Devices.ShapeType.Portait;
tiffSettings.SkipBlankPages = false; //create TIFF device
Aspose.Pdf.Devices.TiffDevice tiffDevice = new Aspose.Pdf.Devices.TiffDevice(pgsize, deviceresolution, tiffSettings);
tiffDevice.Process(pdfDocument, tiffFullPath);
Result:
*** Error: System.ArgumentException: Value of ‘-244’ is not valid for ‘red’. ‘red’ should be greater than or equal to 0 and less than or equal to 255.
at TestMultipageTifToPdf.Program.APdf2Tiff(String incomingfullpath, String outgoingfullpath) in E:\VS Projects\AsposeNet\TestMultipageTifToPdf\Program.cs:line 73
at TestMultipageTifToPdf.Program.Main(String[] args) in E:\VS Projects\AsposeNet\TestMultipageTifToPdf\Program.cs:line 145
End
Thanks
Clive