Hi
I managed to convert a one page Word document with the following code in the using statement:
Aspose.Imaging.ImageOptions.TiffOptions optionsImg = new Aspose.Imaging.ImageOptions.TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);
optionsImg.Photometric = Aspose.Imaging.FileFormats.Tiff.Enums.TiffPhotometrics.Palette;
optionsImg.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Packbits;
optionsImg.BitsPerSample = new ushort[] { 8 };
optionsImg.Palette = Aspose.Imaging.ColorPaletteHelper.Create8Bit();
However when I run the file through DPF Manager it complains that the Image IFD must have a tag X Resolution and Y Resolution. Can I add these tags myself? I have found the Tags property on the TiffOptions object but I can’t find any documentation on how to use it.
When I convert a multipage Word document I get the following error while saving the document:
{Aspose.Imaging.CoreExceptions.ImageFormats.TiffImageException: The strip 0 has corrupt data and cannot be decoded. Error: Failed to decode. The first compression code should be . Table is not ready.
at .. (Rectangle )
at .( , IList1 )</div><div> at .(Rectangle , , , Int32 , Int32 )</div><div> at . (TiffStreamReader , Rectangle , IPartialArgb32PixelLoader )</div><div> at .LoadPartialArgb32Pixels(Rectangle , IPartialArgb32PixelLoader )</div><div> at Aspose.Imaging.RasterImage.. (Rectangle )</div><div> at .( , IList
1 )
at .(Rectangle , , , Int32 , Int32 )
at Aspose.Imaging.RasterImage.(Rectangle , Int32[] , Boolean , IPartialArgb32PixelLoader )
at Aspose.Imaging.RasterImage.(Rectangle , Boolean , IPartialArgb32PixelLoader )
at Aspose.Imaging.RasterImage.LoadPartialArgb32Pixels(Rectangle desiredRectangle, IPartialArgb32PixelLoader pixelLoader)
at Aspose.Imaging.FileFormats.Tiff.TiffFrame.(RasterImage , TiffStreamWriter , Boolean , TiffOptions , ExifData , XmpPacketWrapper , Rectangle )
at .Export(Image , Stream , ImageOptionsBase , Rectangle )
at Aspose.Imaging.Image.Save(Stream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)}