Magento2: Arabic invoice pdf issue Magento 2.3.0 showing as Arabic letters but not correct

Created on 27 Nov 2019  Â·  23Comments  Â·  Source: magento/magento2

Preconditions (*)

Magento 2.3.0 & 2.3-develop
The store should be in Arabic

Steps to reproduce (*)

1) Place an order in Arabic store
2) Customer fill the address and name all in Arabic
3) Login to the admin panel and open orders
4) Create an invoice against the order
5) Download the invoice pdf and compare the content in the admin side with the invoice pdf

Expected result (*)

same as content below
eg: الإسم ابو بدر المطيري
image

Actual result (*)

here it's showing in different data
eg : يريطملا ردب وبا
image

Locale Fixed in 2.4.x Clear Description Confirmed Format is valid Ready for Work P3 Reproduced on 2.3.x S3 good first issue

All 23 comments

Hi @Alwafaa123. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@Alwafaa123 do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

Hi @Alwafaa123 thank you for the report. Please provide more information. I don't see what the problem you have exactly. More information about reporting you can find here

Preconditions ()
Magento 2.3.0
The store should be in Arabic
Steps to reproduce (
)
1) Place an order in Arabic store
2) Customer fill the address and name all in Arabic
3) Login to the admin panel and open orders
4) Create an invoice against the order
5) Download the invoice pdf and compare the content in the admin side with the invoice pdf
Expected result ()
same as content below
eg: الإسم ابو بدر المطيري
image
Actual result (
)
here it's showing in different data
eg : يريطملا ردب وبا
image

@magento give me 2.3-develop instance

Hi @AnnaShepa. Thank you for your request. I'm working on Magento 2.3-develop instance for you

Hi @AnnaShepa, here is your Magento instance.
Admin access: https://i-25769-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@magento i am working on it

@sagaltsev got any solution?

Hi @engcom-Charlie. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Add label Issue: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

:white_check_mark: Confirmed by @engcom-Charlie
Thank you for verifying the issue. Based on the provided information internal tickets MC-29274 were created

Issue Available: @engcom-Charlie, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._

@engcom-Charlie issue has been resolved?

@Alwafaa123 we have to wait when some developer will assign this ticket

@engcom-Charlie how can we solve the issue? any idea?

@Alwafaa123 sorry, but i have no idea.

Also, I have the same problem. Do you have any solution or update?

@fisal77 not yet waiting for the fix. Let me know if you have any idea about the same.

@Alwafaa123 , @fisal77

Zend pdf library doesn't support Arabic language RTL, if you will check the content from left to right you will found that content is good just direction is changed.

@Alwafaa123

In this case ... I am very sorry to inform you that Magento is built using Zend framework,
and unfortunately, there are many problems in supporting Arabic, especially in the Zend PDF.

that’s why we use TCPDF http://www.tcpdf.org/

but in your case you have two options as I see:

1st option is create new module with Zend Drawer & TCPDF to support Arabic Characters and solving the reversed characters problem… but some information are fixed.

2nd option with highly recommended from me.. is using this extension

https://www.magetrend.com/magento-2-pdf-invoice

with this extension you can create new templates for (invoice,shipment,order,credit memo).

I have use it a lot .. and it’s really good.

I hope my reply is clear to you.

Hi @Alwafaa123. Thank you for your report.
The issue has been fixed in magento/magento2#27887 by @ihor-sviziev in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.0 release.

After testing the update, The problem still exists.
The Arabic letters now in correct order, but letters disjointed.

Hi @ammarabdulsalam,
Could you report new issue with exact steps to reproduce with linking to this one? Unfortunately I just googled examples somewhere in internet and it looked to me as good enough solution.

This issue was fixed for Hebrew for sure, and looks like partially fixed for Arabic

As I understood - in Arabic some letters should be joined in case when they’re going together - unfortunately the library Zend PDF that magento use currently isn’t fully support RTL languages, and it’s actually discontinued, so proper solution will be replacing used library that requires really huge effort.

@ihor-sviziev
isn't there a current solution for this problem I just updated to Magento 2.4 put as @ammarabdulsalam said the Arabic letters are disjointed

@EhabAmawi @ammarabdulsalam could you report a separate issue with the exact steps to reproduce and data that currently works incorrectly?

Was this page helpful?
0 / 5 - 0 ratings