No text in PDF, only images
See original GitHub issueThank you for submitting an issue to jsPDF. Please read carefully.
Are you using the latest version of jsPDF?
yes,
https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.min.js
Have you tried using jspdf.debug.js?
Yes
Steps to reproduce
I am using jsPDF to save my tables made with dataTables plugin.
Here is my code:
var doc = new jsPDF();
var specialElementHandlers = {
'#editor': function (element, renderer) {
return true;
}
};
$('#Save_as_pdf').click(function () {
doc.fromHTML($('#inventory_table').html(), 15, 15, {
'width': 170,
'elementHandlers': specialElementHandlers
});
doc.save('Inventory.pdf');
});
What I saw
In Chrome:
Error and an empty PDF:
In IE 11:
Only large images instead of what should have been icons but still no text:
What I expected
PDF with my dataTables, containing text and images.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
No text, only logos & graphics print - Adobe Support Community
When attempting to print a pdf file, no text is printed however, logos and any graphics, regardless of color or B&W, print fine....
Read more >Microsoft Word - Save as PDF - No Text Appearing, Only Images
pdf, no words are in the PDF, only the images appear in the document. I've tried "Save a Copy" and selected PDF. I've...
Read more >Fixing Image-only PDFS: Text/Character Recognition in ...
Often you will inherit a PDF file that was scanned as an image of text. This means that a sighted person can read...
Read more >How to Create a non-searchable (image only) PDF file?
To create a PDF Image Only document: •Open a document from a Windows application (Word, Excel, Edge, etc.) •Print the document and select...
Read more >Why is my pdf printing with missing text?
A PDF form that is garbled or missing text after printing could be due to a system font inconsistency. To fix this issue...
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 FreeTop 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
Top GitHub Comments
Can you try to give fromHTML the elementHandler? Instead of $(‘#inventory_table’).html() writing $(‘#inventory_table’)[0]
I gave you the solution based on your code. If your code is faulty in another place, I cant fix that. Provide an jsfiddle or so, to have collaborated help. If not, I am not able to guess your problem.