Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arabic invoice pdf issue Magento 2.3.0 showing as Arabic letters but not correct #25769

Closed
bibin-alwafaa opened this issue Nov 27, 2019 · 24 comments · Fixed by #27887
Closed
Assignees
Labels
Component: Locale Fixed in 2.4.x The issue has been fixed in 2.4-develop branch good first issue Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P3 May be fixed according to the position in the backlog. Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.

Comments

@bibin-alwafaa
Copy link

bibin-alwafaa commented Nov 27, 2019

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

@m2-assistant
Copy link

m2-assistant bot commented Nov 27, 2019

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

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Nov 27, 2019
@AnnaShepa
Copy link
Contributor

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

@bibin-alwafaa
Copy link
Author

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

@AnnaShepa
Copy link
Contributor

@magento give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team
Copy link
Contributor

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.

@sagaltsev
Copy link

@magento i am working on it

@bibin-alwafaa
Copy link
Author

@sagaltsev got any solution?

@engcom-Charlie engcom-Charlie self-assigned this Nov 29, 2019
@m2-assistant
Copy link

m2-assistant bot commented Nov 29, 2019

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: 👇

  • 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.

@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Nov 29, 2019
@engcom-Charlie engcom-Charlie added Component: Locale good first issue Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Nov 29, 2019
@ghost ghost unassigned engcom-Charlie Nov 29, 2019
@magento-engcom-team
Copy link
Contributor

✅ 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.

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Nov 29, 2019
@bibin-alwafaa
Copy link
Author

@engcom-Charlie issue has been resolved?

@engcom-Charlie
Copy link
Contributor

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

@bibin-alwafaa
Copy link
Author

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

@engcom-Charlie
Copy link
Contributor

@Alwafaa123 sorry, but i have no idea.

@fisal77
Copy link

fisal77 commented Jan 10, 2020

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

@bibin-alwafaa
Copy link
Author

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

@imrandotftr
Copy link

imrandotftr commented Jan 23, 2020

@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.

@fisal77
Copy link

fisal77 commented Feb 13, 2020

@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.

@magento-engcom-team magento-engcom-team added this to PR In Progress in Community Backlog Mar 24, 2020
@ghost ghost assigned ihor-sviziev Apr 17, 2020
@ghost ghost added Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. Priority: P3 May be fixed according to the position in the backlog. labels Apr 24, 2020
@slavvka slavvka linked a pull request Apr 24, 2020 that will close this issue
4 tasks
@ghost ghost moved this from PR In Progress to Done (last 30 days) in Community Backlog Apr 25, 2020
@magento-engcom-team magento-engcom-team removed this from Done (last 30 days) in Community Backlog Apr 26, 2020
@magento-engcom-team
Copy link
Contributor

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

The fix will be available with the upcoming 2.4.0 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label May 1, 2020
@ammarabdulsalam
Copy link

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

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented May 20, 2020

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.

@EhabAmawi
Copy link

@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

@ihor-sviziev
Copy link
Contributor

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

@asma-postpay
Copy link

@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

Hi Ehab, do you have any solution for this problem ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Locale Fixed in 2.4.x The issue has been fixed in 2.4-develop branch good first issue Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P3 May be fixed according to the position in the backlog. Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
None yet
Development

Successfully merging a pull request may close this issue.