Hi,
When converting a DOCX to PDF, I noticed some letters get interchanged.
Code:
var doc = new Document(@".\test.docx");
doc.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance;
doc.Save(@".\test.pdf");
The issue seems to happen with certain fonts/styles (Calibri in italic and YU Gothic in both standard and italic).
I’ve attached the test files and a screenshot for your reference. Could you please help to take a look?
test.zip (143.6 KB)
Thanks,
@ServerSide527
- You are reporting letter interchange issues when converting DOCX to PDF using Aspose, specifically with fonts like Calibri italic and YU Gothic .
- Your code uses
HarfBuzzTextShaperFactory.Instance to handle text shaping during conversion, which may be related to the font rendering issues you’re experiencing .
- Similar font-related problems have been reported in other contexts involving Aspose products, such as PDF conversion with Century Gothic and font mismatches in PDF to DOCX conversion , .
Based on the information provided, this could be a known issue with how certain fonts are handled during the conversion process, especially when using specific text shaping factories like HarfBuzzTextShaperFactory.
To help resolve this issue, we recommend:
- Try removing the
HarfBuzzTextShaperFactory and see if the problem persists:
var doc = new Document(@".\test.docx");
// doc.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance; // Comment this line
doc.Save(@".\test.pdf");
- If the issue continues, consider updating to the latest version of Aspose.Words, as font handling improvements are regularly made.
If the problem persists after trying these steps, please provide more details or a minimal reproducible example so we can investigate further. A support engineer will follow up in this thread if needed.
@ServerSide527
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-29002
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.