question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Strange formatting of number fields

See original GitHub issue

In case where a number field follows a format such as “100 000,00” (space after every 3 digits, comma for decimal point) the output file replaces the space with a slash (/) and places a space between every digit, like so:

image

I followed the creation of the PDF file in our project all the way down until the code got to jsPDF, this is what the model looks like before it exits our code and gets sent to the JsPdfAutotable.save() method:

Screenshot 2020-07-28 at 17 38 16

The highlighted values will always come out in the format “1 / 0 0 0 , 0 0” for some reason. This is doubly confusing since the number is given as a string, like any other value.

I’m using Angular 9. This might be an Autotable issue, in which case I will move it to that project.

Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
HackbrettXXXcommented, Jul 30, 2020

Alternatively you could add a TTF Unicode font that supports this character. Replacing it is probably, the better option, though.

1reaction
HackbrettXXXcommented, Jul 30, 2020

Maybe it uses a different space character or something like that? Please check the char codes of the strings.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix text-formatted numbers by applying a number format
In this case, you can apply number formatting. Select the cells that contain the numbers that are stored as text.
Read more >
Strange Number Formatting Issue | MrExcel Message Board
I created a file for 2020 and had no issue with the date range field. However, when I try to enter the correct...
Read more >
3 Ways to Fix Mail Merge Number Formats in Microsoft Word
(Tip: It is a good idea to format the cells containing these formulas in a different style, say, italic, or some unusual color...
Read more >
Inconsistency in rendering of number fields - Jira - Atlassian
This is a strange inconsistency - I can't copy-paste a number from one form to another. Jira needs to pick which way it...
Read more >
Why does Excel treat long numeric strings as scientific ...
Now, what is odd is if I format this cell to text, it still shows in scientific notation. Annoying. – Michael Levy. Apr...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found