Aspose cells for java saving Hebrew to PDF shows the right-to-left control characters

Hello,



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.



Regards,

Rafic GHIA

Hi Rafic,


Thank you for contacting Aspose support.

We have evaluated the presented scenario while using the latest version of Aspose.Cells for Java 16.10.6, and we are able to notice the said problem. In order to further investigate the matter, we have logged it as CELLSJAVA-42050 in our bug tracking system. Please spare us little time to properly analyze the case and revert back with updates in this regard.

Java
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);

Hi,

Thanks for using Aspose.Cells.

This is to inform you that we have fixed your issue CELLSJAVA-42050 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

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.

Hello,


I have tested the new library with the control characters \u202B and \u202C: the result is OK now.
However when I tried with the control character \u200E: it is still visible which is not as expected.
To be exhaustive the list of control characters that are used for the Right-to-left display is located on
How to use Unicode controls for bidi text

I have extracted this list in the attached excel file.
As a summary these control characters are:
\u200E
\u200F
\u202A
\u202B
\u202C
\u202D
\u202E
\u2066
\u2067
\u2068
\u2069

Thanks and regards,
Rafic

Hi,


We are sorry that you are still facing the issue.

Could you also provide us sample code (runnable) to test all combinations of control chars with output Excel and PDF files here, it will help us to evaluate your issue precisely to consequently figure it out soon.

Thank you.