We are generating PDF files using Aspose.Cells for java (aspose-cells-8.6.3).
When we generating Hebrew text which contains the control characters \u202B and \u202C? These characters are correctly handled in the generated excel where they are invisible but are displayed as strange characters in the pdf output (See attached files).
Please note that when we open the generated excel file using Excel 2010 and from Excel 2010 we save the file as pdf the result is displayed correctly without these characters.
We have also downloaded and tried with aspose-cells-16.10.0.jar but the issue remains.
Thanks for your help.
String fontName = “ArialUnicodeMS”; Workbook wb = new Workbook(); Worksheet sheet = wb.getWorksheets().get(0); sheet.setDisplayRightToLeft(true); Cells cells = sheet.getCells(); cells.merge(1,1,1,10); cells.merge(3,1,1,10); Style style = null; Cell cellB2 = cells.get(“B2”); style = cellB2.getStyle(); style.getFont().setName(fontName); style.setHorizontalAlignment(TextAlignmentType.RIGHT); cellB2.setStyle(style); Cell cellB4 = cells.get(“B4”); cellB4.setStyle(style); String x202B = “\u202B”; String x202C = “\u202C”; String delimiterWithoutCtrl = " - "; String delimiterWithCtrl = " \u202C-\u202B "; String str1 = “ABC”; String str2 = “DEF”; String str3 = “\u05D1\u05D2\u05D3”; String titleValue = x202B + str1 + delimiterWithoutCtrl + str2 + delimiterWithoutCtrl + str3; String subtitleValue = x202B + str1 + delimiterWithCtrl + str2 + delimiterWithCtrl + str3; cellB2.setValue(titleValue); cellB4.setValue(subtitleValue); wb.save(“D:/output.xlsx”, SaveFormat.XLSX); wb.save(“D:/output.pdf”, SaveFormat.PDF);
The issues you have found earlier (filed as CELLSJAVA-42050) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.