Aspose pdf 21.10 for java does not handle all Arabic chars e.g:
var font = FontRepository.findFont("Noto Sans Arabic");
var textState = new TextState();
textState.setFontSize(9);
textState.setFontStyle(FontStyles.Regular);
textState.setForegroundColor(Color.getBlack());
textState.setLineSpacing(5F);
textState.setFont(font);
var text = "ق - ن - ف";
System.out.println(font.doesFontContainAllCharacters(text));
var textFragment = new TextFragment(text);
textFragment.getTextState().applyChangesFrom(textState);
var document = new Document();
var page = document.getPages().add();
page.getParagraphs().add(textFragment);
document.save("HelloWorld_out.pdf");
Output HelloWorld_out.pdf instead of “ق - ن - ف” contains " - - ", but some other Arabic chars works fine - please check above example with “أسعار”.
We have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as PDFNET-50931. You will be notified via this forum thread once this issue is resolved.
It has been quite a while since you replicated the issue. Can you let me know when it would be fixed? Our customers are waiting for it as they are not able to generate proper PDF files.
Currently, your issue is pending for analysis and is in the queue. Once we complete the analysis of your issue, we will then be able to provide you an estimate.
We have planned to investigate this issue. Once there is any update available on it, we will be more than happy to share it with you. Thanks for your patience.
We have logged separate issue for Aspose.PDF for Java as PDFJAVA-41946. We will inform you once there is an update available on it. We apologize for your inconvenience.
Hopefully, the fix of this issue will be available in the next version of Aspose.PDF for Java i.e. 22.8. We will inform you via this forum thread once there is an update available on it.
@tahir.manzoor
The issue still exists. We checked it on this example.
Font font= FontRepository.findFont("Noto Sans Regular");
TextState tstate= new TextState();
tstate.setFont(font);
Document document = new Document();
document.getPageInfo().setDefaultTextState(tstate);
Page page = document.getPages().add();
TextFragment paragraph = new TextFragment("مرة أخرى إلى الأقلام أو المضخات اللاصقة الآن.");
paragraph.getTextState().applyChangesFrom(tstate);
page.getParagraphs().add(paragraph);
document.save("Example.pdf");
After copying text from a pdf file and pasting it into a word document, the text looks correct. Looks like pdf cut the text. Can you investigate the issue again? Example (1).pdf (924.0 KB)
We have worked over issue and noticed that this issue is more related to fonts. Could you please provide the exact font file that cause the test cut problem. It could be the situation when glyphs in the font are designed in a way that symbols are placed out of the visible line of text. So, we need the exact font file to reproduce and fix the issue. Thanks for your cooperation.
We are afraid that the earlier logged ticket has not been yet resolved. It is currently being investigated and as soon as it is resolved, we will update you in this forum thread. Please spare us some time.
We are sorry to inform you that your ticket has not been resolved yet due to a backlog of issues in the queue. We have escalated your ticket to the next level of priority and we will update you as soon as we have an estimated time of resolution. We appreciate your patience and understanding. Please accept our sincere apologies for any inconvenience caused.