Formula font changing from Italic to Normal format
rtaImage (4).jpeg (67.3 KB)
Thank you for your inquiry. Could you kindly provide additional details, including a code sample, the development environment, and the original document for testing? This information will be necessary for us to perform further investigation.
GroupDocs_1 (1).docx (600.9 KB)
GroupDocs_1.pdf (858.9 KB)
Sample word and converted files.
PDF version:1.7
PDF Producer: Aspose.PDF for Java 24.3
Thank you for the clarification. We will need some time to reproduce this issue, and we’ll get back to you as soon as possible.
Unfortunately, we were not able to reproduce the issue with the formula formatting. Could you please clarify which operating system you are using for the conversion (Windows, Linux, or macOS)?
We are using RHEL Linux OS
Often, font version discrepancies after conversion occur because the required fonts aren’t available on the Linux system. To address this, we’ve added a feature to allow specifying a custom font directory path via the ConverterSettings class. Please refer to the code example below and try adding the missing fonts.
WordProcessingLoadOptions loadOptions = new WordProcessingLoadOptions();
loadOptions.setPreserveDocumentStructure(true);
ConverterSettings converterSettings = new ConverterSettings();
converterSettings.setFontDirectories(Arrays.asList("your font folder"));
Converter converter = new Converter("your document path", loadOptions, converterSettings);
PdfConvertOptions pdfConvertOptions = new PdfConvertOptions();
FileOutputStream fileOutputStream = new FileOutputStream("output.pdf");
converter.convert(() -> fileOutputStream, pdfConvertOptions);
converter.close();
Don’t hesitate to reach out with any further questions!
As shown in your document, the formula uses the ‘Cambria Math’ font, which is attached for your convenience. Additionally, the ‘Apple Color Emoji’ font is included in your document, and this font may be missing on Linux systems. You can find the required fonts on sites like this GitHub repository or this one. You can also install them locally by following this guide. For instructions on how to set up a folder with custom fonts for conversion, please refer to my previous message.
cambria-math_freefontdownload_org.zip (781.7 KB)
Hi @evgen.efimov I have tried testing the font Cambria Math was fixed by using above zip file. Can you also suggest how can we fix the issue of Italic font?
After conversion Italic font is getting converted to normal font. Verify the font of Formula.
Font accessible file.docx (108.2 KB)
fontAccessible.pdf (124.6 KB)
Hello @sonamsinha
We appreciate your feedback! It’s great to hear that we were able to assist with one of your problems. However, after reviewing the files you sent, we’re not entirely sure what specific issue with the italic font you’re referring to. Could you provide a screenshot with the differences?
I’ve added a screenshot from my end for comparison, and I don’t see any evident differences between the italic and normal styles.
Screenshot_1.png (90.2 KB)
Hi @evgen.efimov
Screenshot 2024-11-19 at 6.48.23 PM.jpg (329.0 KB)
Screenshot 2024-11-19 at 6.48.03 PM.jpg (68.3 KB)
As we can see the italian font is not enabled in pdf . Can you please suggest on resolution here?
Thank you for providing the screenshots, they helped us identify the differences. We will need some additional time to investigate this issue and will get back to you with the results as soon as possible.
Hello @sonamsinha ,
Thanks for your patience! We’ve looked into this and confirmed it’s a bug. Unfortunately, we don’t have a workaround to share right now. We’ve created a ticket for this issue (ID: CONVERSIONJAVA-2605) in our tracker and will notify you here as soon as it’s fixed.