Text font is incorrect after DOC to TIFF conversion using Java

Hi,
I have this doc file and want to convert it into a TIF-3 file. There are 2 different problems.
1st problem - Aspose.Words loaded it as a 2-page Document whereas the actual doc has only 1 page
2nd problem - Some letters are not as sharp as the original document.
image.png (48.8 KB)
Screenshot 2020-08-17 at 9.57.22 PM.jpg (654.7 KB)
doc_tiff_conversion.zip (5.9 KB)

@tmhungtrilogy

We have tested the scenario using the latest version of Aspose.Words for .NET 20.8 with following code example. We have not found the shared issue. So, please use Aspose.Words for .NET 20.8. We have attached the output TIFF file with this post for your kind reference.

out.zip (94.0 KB)

Document document = new Document(MyDir + "41244304_7.doc");
ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Tiff);
imageSaveOptions.Resolution = 300;
document.Save(MyDir + "out.tiff", imageSaveOptions);

@tahir.manzoor Sorry. I used Java Aspose.Words 20.3. My code is literally as same as your example. Is it a bug with Java lib.
My environment:
JDK: openjdk 14.0.1 2020-04-14
OS: MacOS Catalina 10.15.3 (19D76)

    Document document = new Document(is);
    ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.TIFF);
    imageSaveOptions.setResolution(300);
    document.save(os, imageSaveOptions);

@tmhungtrilogy

Please use the latest version of Aspose.Words for Java 20.8 to get the desired output. Following code example shows how to convert DOC to TIFF.

Document document = new Document(MyDir + "41244304_7.doc");
ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.TIFF);
imageSaveOptions.setResolution(300);
document.save(MyDir + "20.8.tiff", imageSaveOptions);

Your suggestion didn’t work. I tried with this Aspose Words

    <dependency>
        <groupId>com.aspose</groupId>
        <artifactId>aspose-words</artifactId>
        <version>20.8</version>
        <classifier>jdk16</classifier>
    </dependency>

Here is the output
words_20_8.zip (294.9 KB)

@tmhungtrilogy

Please get the 30 days temporary license and apply it before importing document into Aspose.Words’ DOM.

Please also make sure that font used in your document are installed on the machine where you are converting document. You can implement IWarningCallback as shown below to get warning message for missing fonts.

Document document = new Document(MyDir + "41244304_7.doc");
ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.TIFF);
imageSaveOptions.setResolution(300);

document.setWarningCallback(new com.aspose.words.IWarningCallback() {
    @Override
    public void warning(com.aspose.words.WarningInfo warningInfo) {
        if(warningInfo.getWarningType() == WarningType.FONT_SUBSTITUTION)
            System.out.println(warningInfo.getDescription());
    }
});
document.save(MyDir + "20.8.tiff", imageSaveOptions);
1 Like

Thank you a lot. It’s caused by missing fonts.