Problem Date with jspdf.text() in IE and EDGE
See original GitHub issueI tried to use the jsPDF to write a date but I can’t write correctly.
The code is :
var pdf = new jsPDF('p', 'pt');
var dateOptions = {
day: "numeric",
month: "numeric",
year: "numeric"
};
pdf.text("in "+ new Date("28/12/2015").toLocaleString("fr-fr", dateOptions), 40, 100);
pdf.text("in 28/12/2015", 40, 125);
pdf.text("in "+new Date("28/12/2015").toString, 40, 150);
The result is :
i n 2 8 / 1 2 / 2 0 1 5
in 28/12/2015
in Mon Dec 28 2015 01:00:00 GMT+0100 (Paris, Madrid)
The problem is that insert many blank space between letters. This problem appear if I use date toLocaleString function and the Browers IE or EDGE. Is there any solution?
thanks in advance
Issue Analytics
- State:
- Created 7 years ago
- Comments:12
Top Results From Across the Web
Problem Date with jspdf.text() in IE and EDGE · Issue #937
I tried to use the jsPDF to write a date but I can't write correctly. The code is : var pdf = new...
Read more >jspdf text stretched in MS Edge
This turns out to be another case of IE's toLocaleString has strange characters in results: Edge is adding unicode formatting characters to ...
Read more >jsPDF in Internet Explorer and Microsoft Edge - MSDN
Hello, I am using the jsPDF library in my application to display PDFs and save them, but in Internet Explorer and Microsoft Edge...
Read more >Generating PDFs from Web Pages on the Fly with jsPDF
Massimo Cassandro demonstrates how to make use of jsPDF, a JavaScript library for generating PDF documents from web pages.
Read more >jspdf.js - Documentation
ADVANCED) {; throw new Error(; methodName +; " is only available in 'advanced' API mode. " +; "You need to call advancedAPI() first....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I found the solution. I detected the character and I replaced it.
text = text.replace(/[\u200E]/g, '');
Found this very helpful
Regards, Sagarika