![]() ![]() Jspdf.src = 'https'+'://'+'cdnjs'+'.cloudflare'+'.com/ajax/libs/jspdf/1.5.3/' /* had to set it like this, because disqus was breaking the link. Let imgData = can.toDataURL("image/jpeg", 1.0) Let can = document.createElement('canvas') Ĭon.drawImage(img, 0, 0, img.width, img.height) Let elements = document.getElementsByTagName("img") Let jspdf = document.createElement("script") Open Developer Tools on separate window and choose the Console tab. ![]() Scroll to the bottom of the document, so all the pages are present.Note 3: If you’re getting only part of the document visible, try zooming out your browser and then run the script. The Coding Cat thinks it could be done preserving text, but he didn’t have more time for this and jpg solution was sufficient. He needed it on other devices than his PC, so he wrote a little ‘hack’ in JS. The Coding Cat got some document that he could not read on his Android phone or iPad showing only error because of read only mode that the mobile devices could not handle.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |