jquery - JSPDF - repeat the content so it appears multiple times on the page -
i creating small letter generator project. i'm using jspdf , want repeat content in 'lettercontent' div on exported pdf document multiple times down page.
is there anyway this?
thanks help!
<html> <head> <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> <script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script> <script src="jspdf.min.js"></script> <script> $(function () { $('#generateletter').click(function () { var doc = new jspdf(); doc.addhtml($('#lettercontent')[0], 15, 15, { 'background': '#fff' }, function() { doc.save('party-letter.pdf'); }); }); }); </script> </head> <body> <div id="lettercontent"> <p> dear neighbour, <br /> <br /> inform having party on <input type="date" style="border-style: none;" /> @ <input type="time" style="border-style: none;" />. <br /> <br /> kind regards, <br /> <input type="text" style="border-style: none;" onkeypress="this.style.width = ((this.value.length + 1) * 8) + 'px';" placeholder="first name" /><input type="text" style="border-style: none;" onkeypress="this.style.width = ((this.value.length + 1) * 8) + 'px';" placeholder="last name" /> </p> </div> <div id="editor"></div> <button id="generateletter">generate letter</button> </body> </html>
Comments
Post a Comment