jsPDF icon indicating copy to clipboard operation
jsPDF copied to clipboard

Parenthesis symbols are reversed, if rtl flag is enabled

Open novsstation opened this issue 3 years ago • 6 comments

Hi,

Currently parentheses are inverted, if rtl flags are enabled. I have found those flags in this issue https://github.com/parallax/jsPDF/issues/2235

In almost case rtl output seems to be valid, but in case of numbers (phone, fax, etc) there is an issue, Sample to reproduce: - https://jsfiddle.net/L6e20pym/7/

var doc = new jspdf.jsPDF();

const textOptions = {};
textOptions.isInputVisual = false;
textOptions.isOutputVisual = true;
textOptions.isInputRtl = true;
textOptions.isOutputRtl = false;

const text = '(800) 955-2292';
doc.text(100, 10, text, textOptions);

var data = doc.save();

Expected text: 955-2292 (800) Actual text: 955-2292 )800(

As you can see, parenthesis are inverted

image

novsstation avatar Feb 21 '22 12:02 novsstation

Did you set the font correctly? Might be related to #3171 or #3224.

HackbrettXXX avatar Feb 23 '22 16:02 HackbrettXXX

I have the same. Amiri font, language set to ar.

BiDi options:

  • options.isInputVisual = false;
  • options.isOutputVisual = true;
  • options.isInputRtl = true;
  • options.isOutputRtl = false;

Much has been improved since latest releases so mixed content like an email address gets rendered way better than before. But parenthesis still get reversed.

mgroeneweg avatar Mar 08 '22 11:03 mgroeneweg

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

github-actions[bot] avatar Jun 07 '22 02:06 github-actions[bot]

This is still relevant. Would be nice if the parenthesis would work correctly out of the box in these situations as well.

mgroeneweg avatar Jun 07 '22 04:06 mgroeneweg

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

github-actions[bot] avatar Sep 06 '22 02:09 github-actions[bot]

And once again a bump. Please fix this.

mgroeneweg avatar Sep 06 '22 04:09 mgroeneweg

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

github-actions[bot] avatar Dec 07 '22 02:12 github-actions[bot]

And once again a bump. Please fix this.

mgroeneweg avatar Dec 07 '22 05:12 mgroeneweg

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

github-actions[bot] avatar Mar 08 '23 02:03 github-actions[bot]

And once again a bump. Please fix this.

mgroeneweg avatar Mar 08 '23 05:03 mgroeneweg

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

github-actions[bot] avatar Jun 07 '23 02:06 github-actions[bot]

And once again a bump. Please fix this. This is ridiculous! Why is noone even replying to these issues?

mgroeneweg avatar Jun 07 '23 05:06 mgroeneweg

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

github-actions[bot] avatar Sep 07 '23 01:09 github-actions[bot]