Aspose.Words for Java does not render fonts properly when the settings:
Control Panel -> Region and Language -> Administrative -> Language for non-Unicode programs:
is set to ‘German (Austria)’.
After changing this settings from English(US) to German (Austria) the computer must be restarted 2 times in order to reproduce this issue! Restarting it just once does not show the problem.
Compare the input file TestDoc.doc and the produced output files
ok.tif and faulty.tif. The file ‘faulty.tif’ is the one produced after 2
restarts with the settings ‘German (Austria)’.
Configuration:
Windows 7
Java 1.7.0_55
Aspose.Words 14.5.0
Here is the test code:
public class Main { public static void main(String[] args) throws Exception { if (args.length != 2) { System.out.println("Usage: java -jar ProblemDemo.jar "); return; } System.out.println("Current default locale is: " + Locale.getDefault()); try (InputStream inputStream = Main.class.getResourceAsStream("/Aspose.Total.Java.lic")) { com.aspose.words.License wordsLicense = new com.aspose.words.License(); wordsLicense.setLicense(inputStream); } System.out.println("Creating new document: Document doc = new Document(\"" + args[0] + "\");"); Document doc = new Document(args[0]); ImageSaveOptions options = new ImageSaveOptions(SaveFormat.TIFF); options.setTiffCompression(TiffCompression.CCITT_4); options.setResolution(300); options.setTiffBinarizationMethod(ImageBinarizationMethod.FLOYD_STEINBERG_DITHERING); doc.save(args[1], options); System.out.println("Done!"); } }
Please do not close this issue as ‘not reproducible’. Try the settings, restart the computer twice after setting ‘Language for non-Unicode programs’ to ‘German (Austria)’. I am able to reproduce it also on Windows Server 2008 machine. Our customer is located in Austria and this is really an issue as they use their local settings. Thank you for your help.
Kind regards,
Juraj