While apply grayscale tiff generated with 0 kb

If I apply grayscale on the attached doc file. then while generating first-page tiff The exception is throw

Code Sample:

Document doc = new Document("GENERAL.doc");
Aspose.Words.Saving.ImageSaveOptions options = new Aspose.Words.Saving.ImageSaveOptions(Aspose.Words.SaveFormat.Tiff);
options.TiffCompression = Aspose.Words.Saving.TiffCompression.Ccitt4;
options.ColorMode = Aspose.Words.Saving.ColorMode.Grayscale;
options.Resolution = 300;
for (int page = 0; page < doc.PageCount; page++)
{
    var extractedPage = doc.ExtractPages(page, 1);
    extractedPage.Save(Path.Combine($@"GENERAL{page}.tiff"), options);
}

0 KB.zip (69.5 KB)

@hemalp Could you please attach your input GENERAL.doc document here for testing? We will check the issue and provide you more information. Also, please specify what is the target framework of your application.

0 KB.zip (69.5 KB)

@hemalp
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-25237

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Also, it is not quite correct to use Document.ExtractPages method when the target format is fixed page (PDF, XPS, Image etc). In this case you should use FixedPageSaveOptions.PageSet property:

Document doc = new Document(@"C:\Temp\in.doc");
Aspose.Words.Saving.ImageSaveOptions options = new Aspose.Words.Saving.ImageSaveOptions(Aspose.Words.SaveFormat.Tiff);
options.TiffCompression = Aspose.Words.Saving.TiffCompression.Ccitt4;
options.ColorMode = Aspose.Words.Saving.ColorMode.Grayscale;
options.Resolution = 300;
for (int page = 0; page < doc.PageCount; page++)
{
    options.PageSet = new PageSet(page);
    doc.Save(Path.Combine($@"C:\Temp\out{page}.tiff"), options);
}

If the ticket status is closed then. how can I identify when these changes will be provided.

@hemalp The issue is resolved in the current codebase. The fix will be included into the next 23.5 version of Aspose.Words. We will be sure to let you know once it is released.

Ok, Thank you

1 Like

The issues you have found earlier (filed as WORDSNET-25237) have been fixed in this Aspose.Words for .NET 23.5 update also available on NuGet.