Free Support Forum - aspose.com

Multi byte Special characters not getting displayed in PDF


#1

Hi Team,

I am using Aspose license for PDF (in java). In my application I am trying to export a PDF having some multi byte characters. But it is unable to display it properly.

Below is my code.
I did try with multiple fonts to check whether below characters are supported by that font but did not find any luck.
Please help here which font support Special characters mentioned in code ?

Document doc = new Document();
PageInfo pageInfo = doc.getPageInfo();
pageInfo.setLandscape(true);
Page curPage = doc.getPages().add();
Paragraphs paragraphs = curPage.getParagraphs();
Font textFont = FontRepository.openFont(Demo.class.getClassLoader().getResourceAsStream(“fonts/ARIALUNI.TTF”), FontTypes.TTF);
textFont.setEmbedded(true);
TextFragment textFragment = new TextFragment();
textFragment.getTextState().setFont(textFont);
textFragment.setText(“𩝭 SADDAM HUSSEIN 𠇔𣁋𩝭𤫟𤪤𪁏𩗗 sdfjkdf SADDAM HUSSEIN”);
paragraphs.add(textFragment);
TextFragment textFragment2 = new TextFragment();
textFragment2.getTextState().setFont(textFont);
textFragment2.setText(“𩝭 SADDAM HUSSEIN 𠇔𣁋𩝭𤫟𤪤𪁏𩗗 sdfjkdf SADDAM HUSSEIN”);
paragraphs.add(textFragment2);
doc.save(“test.pdf”);


#2

@JibrailS

Thanks for contacting support.

We have tested the scenario in our environment using Aspose.PDF for Java 19.1 and were able to replicate the issue. The issue seemed related to font which can support the language characters which you are adding to the PDF page. We also tried using different fonts (e.g. Arial Unicode MS, SimSun, NSimSun, MingLiU, MingLiU-Ext, Mitr) but could not get much success.

We have logged an investigation ticket as PDFJAVA-38311 in our issue tracking system for the sake of detailed investigation. We will further check the issue in details and keep you posted with the status of ticket resolution. Please be patient and spare us little time.

We are sorry for the inconvenience.


#3

Hi Asad,

Thanks for Update.

Could you please check for the solution for same and let me know the same as our application is being updated to support multiple languages including Chinese characters shared in above mentioned code.

Your Cooperation is appreciable.

Thanks
Jibrail Shaikh


#4

@JibrailS

Thanks for sharing your concerns.

We will definitely investigate the issue in details while keeping your concerns in view. As soon as some additional updates are available in this regard, we will surely share with you. Please spare us little time.


#5

Hi Asad,

Thanks for Response,

When can we expect resolution on this ?
We are in critical development phase and this issue is show stopper for us.
We do posses licence for Aspose-pdf and expecting resolution on this.

Regards,
Jibrail Shaikh


#6

@JibrailS

Thanks for sharing your concerns.

We would like to share with you that your issue has already been taken into account and we will definitely consider your concerns during its investigation. As soon as some significant progress is made towards issue resolution, we will share with you. Please spare us little time. We greatly appreciate your patience and comprehension in this regard.

We are sorry for the inconvenience.