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

Free Support Forum - aspose.com

Convert Word Document to TIFF & Set Image Resolution & Ccitt3 Ccitt4 LZW or RLE Compressions | C# .NET on Lambda Linux

I need a specific compression/size format to save my Document as a Tiff. See format below:
image.png (3.7 KB)

I’m configuring Ccitt.4 in the SaveOptions object, but when I look at the saved image properties the Tiff file has Ccitt.6 compression not 4. Also the page height is off by 1 pixel. How can I correctly save it as Ccitt.4 compression at 1728px page height?

See code and screenshot of file properties below:
image.png (13.8 KB)
image.png (2.5 KB)

Running in Lambda Linux environment.

Thank you,
Dylan

@dylanworks,

Specifying TiffCompression.Ccitt3 to ImageSaveOptions.TiffCompression will actually give you CCITT T.4 in TIFF images’ property details. And you are right, the dimensions are one pixel off. On my end, Aspose.Words is exporting width at 1729 pixels not 1727. For the sake of any corrections in Aspose.Words’ API, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-21717. We will further look into the details of this problem and will keep you updated on the status of linked issue. We apologize for your inconvenience.

Hi Awais.Hafeez, Thank you for your response. I was able to change the compression successfully. I was also able to save the correct dimensions by changing resolution to 199. I am having some other issues however, missing tiff metadata. The page number seems to be missing:

Here is info on tiff PageNumber
— PageNumber
Tag = 297 (129)
Type = word
N = 2

This tag is used to specify page numbers of a multiple page (e.g. facsimile)
document. Two word values are specified. The first value is the page number;
the second value is the total number of pages in the document. Note that pages
need not appear in numerical order. The first page is 0 (zero).

I will need to somehow convert this to another tiff which has this value.

Thank you,

@dylanworks,

Have you tried the latest (21.1) version of Aspose.Words for .NET on your end? In case the problem still remains, then please ZIP and upload your input Word document, Aspose.Words generated TIFF file and Screenshot(s) showing the undesired behavior here for testing. We will then investigate the issue on our end and provide you more information.

@dylanworks,

Regarding WORDSNET-21717, CCITT Group4, CCITT4 and CCITT T.6 are the names of the same compression type. You can read about it, for example, here https://www.tiffedit.com/blog/archives/268.

About dimensions in pixels. Since Aspose.Words’ API accepts dimensions in points as input. And since in this case there is a conversion of floating point numbers. I am afraid, we cannot guarantee output with 1 pixel precision.

Please let me know if I can be of any further assistance.