index.html 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>jsPDF - Create PDFs with HTML5 JavaScript Library</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta name="description" content="">
  8. <meta name="author" content="">
  9. <!-- Bootstrap -->
  10. <link href="./examples/bootstrap/css/bootstrap.css" rel="stylesheet">
  11. <link href="./examples/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
  12. <!-- Editor CSS -->
  13. <link href="./examples/css/editor.css" rel="stylesheet">
  14. <!-- See closing body for JS -->
  15. <script src="http://use.edgefonts.net/source-code-pro.js"></script>
  16. </head>
  17. <body>
  18. <style>#forkongithub a{background:#000;color:#fff;text-decoration:none;font-family:arial, sans-serif;text-align:center;font-weight:bold;padding:5px 40px;font-size:1rem;line-height:2rem;position:relative;transition:0.5s;}#forkongithub a:hover{background:#333;color:#fff;}#forkongithub a::before,#forkongithub a::after{content:"";width:100%;display:block;position:absolute;top:1px;left:0;height:1px;background:#fff;}#forkongithub a::after{bottom:1px;top:auto;}@media screen and (min-width:800px){#forkongithub{position:absolute;display:block;top:0;right:0;width:160px;overflow:hidden;height:200px;}#forkongithub a{width:160px;position:absolute;top:40px;right:-60px;transform:rotate(45deg);-webkit-transform:rotate(45deg);box-shadow:4px 4px 10px rgba(0,0,0,0.8);}}</style><span id="forkongithub"><a href="https://github.com/MrRio/jsPDF">Star me on GitHub</a></span>
  19. <div class="container">
  20. <div class="masthead">
  21. <div class="pull-right">
  22. <div class="tweet-buttons">
  23. <a href="https://twitter.com/share" class="twitter-share-button" data-via="MrRio" data-size="large">Tweet</a>
  24. <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
  25. <a href="https://twitter.com/MrRio" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @MrRio</a>
  26. <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
  27. </div>
  28. <!--a class="btn btn-primary btn-large" href="http://jspdf.com/downloads/jsPDF-0.9.0rc2.zip">Download Now</a>
  29. <p class="muted" style="text-align: right;">Version 0.9.0rc2</p-->
  30. <a class="btn btn-primary btn-large" href="https://github.com/MrRio/jsPDF">Download Now</a>
  31. <p class="muted" style="text-align: right;" id="dversion">Version 0.9.0rc2</p>
  32. </div>
  33. <h1 class="muted">jsPDF</h1>
  34. <h4>HTML5 JavaScript PDF generation library from <a href="http://twitter.com/MrRio">@MrRio</a> at <a href="http://parall.ax">Parallax</a></h4>
  35. </div>
  36. <div class="row-fluid">
  37. <div class="span6" style="float: right">
  38. <iframe class="preview-pane" type="application/pdf" width="100%" height="650" frameborder="0" style="position:relative;z-index:999"></iframe>
  39. </div>
  40. <div class="span5 no-gutter">
  41. <h2>Have a play.</h2>
  42. <p>A HTML5 client-side solution for generating PDFs. Perfect for event tickets, reports, certificates, you name it! </p>
  43. <p><b>No servers were used in the making of this demo.</b></p>
  44. <div class="template-picker">
  45. <label for="template">Choose example</label>
  46. <select id="template" name="template">
  47. <option>Hold your horses...</option>
  48. </select>
  49. </div>
  50. </div>
  51. <div id="editor" class="bypass"></div>
  52. <div class="controls">
  53. <div class="pull-right">
  54. <!--<a href="#" class="btn btn-primary">Download Your Code</a>-->
  55. <a href="#" class="btn btn-primary download-pdf">Download PDF</a>
  56. </div>
  57. <label class="checkbox">
  58. <input type="checkbox" id="auto-refresh" checked="checked"> Auto refresh on changes?
  59. </label>
  60. <a href="#" class="run-code hide btn btn-success">Run Code</a>
  61. <div class="alert hide">
  62. Auto refresh disabled for this
  63. </div>
  64. </div>
  65. </div>
  66. <div class="clerfix"></div>
  67. <div class="span12 credits">
  68. <h2>The Basics</h2>
  69. <p>Simply include the jsPDF library in your <span class="source">&lt;head&gt;</span>, generate your PDF using the <i>many</i> built-in functions, then hook up a button to trigger the download. All the examples here use jQuery.</p>
  70. <h2>Browser Compatibility</h2>
  71. <p>jsPDF will work in IE6+*, Firefox 3+, Chrome, Safari 3+, Opera. For IE9 and below, we lazily load a Flash shim called Downloadify which enables the files to be downloaded.</p>
  72. <p>* Current build does not have IE6-9 shim enabled</p>
  73. <p><strong>NB:</strong> UTF-8 is <em>not</em> supported by default, however there might be some plugins allowing you to use it, such as <em>addHTML</em></p>
  74. <p>十五向學,三十而立,四十而不惑,五十而知天命,六十而耳順,七十而從心欲,不踰矩.</p>
  75. <h2>Need Help?</h2>
  76. <p>Send me a <a href="http://twitter.com/MrRio">tweet</a> and I'll see if I can help :)</p>
  77. <!-- ADD_PAGE -->
  78. <h2>Credits</h2>
  79. <p>Big thanks to Daniel Dotsenko from <a href="http://willow-systems.com">Willow Systems Corporation</a> for making huge contributions to the codebase. </p>
  80. <p>Thanks to Ajaxian.com for <a href="http://ajaxian.com/archives/dynamically-generic-pdfs-with-javascript">featuring us back in 2009</a>.</p>
  81. <p>Everyone else that's contributed patches or bug reports. You rock.</p>
  82. <h2>License</h2>
  83. <p>(MIT License)</p>
  84. <p>Copyright (c) 2010-2016 James Hall, <a href="https://github.com/MrRio/jsPDF">https://github.com/MrRio/jsPDF</a></p>
  85. <p>Permission is hereby granted, free of charge, to any person obtaining
  86. a copy of this software and associated documentation files (the
  87. "Software"), to deal in the Software without restriction, including
  88. without limitation the rights to use, copy, modify, merge, publish,
  89. distribute, sublicense, and/or sell copies of the Software, and to
  90. permit persons to whom the Software is furnished to do so, subject to
  91. the following conditions:</p>
  92. <p>The above copyright notice and this permission notice shall be
  93. included in all copies or substantial portions of the Software.</p>
  94. <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  95. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  96. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  97. NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  98. LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  99. OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  100. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
  101. </div>
  102. </div> <!-- /container -->
  103. <footer>&copy; 2016 James Hall - <a href="https://parall.ax/pages/privacy-policy">Privacy Policy</a></footer>
  104. <!-- Scripts down here -->
  105. <script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
  106. <!-- Code editor -->
  107. <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.5/ace.js" type="text/javascript" charset="utf-8"></script>
  108. <!-- Scripts in development mode -->
  109. <script type="text/javascript" src="dist/jspdf.debug.js"></script>
  110. <!--script type="text/javascript" src="jspdf.js"></script>
  111. <script type="text/javascript" src="./libs/FileSaver.js/FileSaver.js"></script>
  112. <script type="text/javascript" src="./libs/Blob.js/Blob.js"></script>
  113. <script type="text/javascript" src="./libs/Blob.js/BlobBuilder.js"></script>
  114. <script type="text/javascript" src="./libs/deflate.js"></script>
  115. <script type="text/javascript" src="./libs/adler32cs.js/adler32cs.js"></script>
  116. <script type="text/javascript" src="./plugins/addimage.js"></script>
  117. <script type="text/javascript" src="./plugins/from_html.js"></script>
  118. <script type="text/javascript" src="./plugins/ie_below_9_shim.js"></script>
  119. <script type="text/javascript" src="./plugins/svg.js"></script>
  120. <script type="text/javascript" src="./plugins/split_text_to_size.js"></script>
  121. <script type="text/javascript" src="./plugins/standard_fonts_metrics.js"></script-->
  122. <!-- Editor -->
  123. <script type="text/javascript" src="./examples/js/editor.js"></script>
  124. <!-- Analytics -->
  125. <script type="text/javascript">
  126. $(document).ready(function() {
  127. if(jsPDF && jsPDF.version) {
  128. $('#dversion').text('Version ' + jsPDF.version.split('T').shift());
  129. }
  130. });
  131. var _gaq = _gaq || [];
  132. _gaq.push(['_setAccount', 'UA-32767308-2']);
  133. _gaq.push(['_trackPageview']);
  134. (function() {
  135. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  136. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  137. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  138. })();
  139. </script>
  140. <!--script type="text/javascript">
  141. adroll_adv_id = "P3OVQHTGMBA37E2Z6M77AQ";
  142. adroll_pix_id = "GHWLXTPCARHSXCCSWFFDR7";
  143. (function () {
  144. var oldonload = window.onload;
  145. window.onload = function(){
  146. __adroll_loaded=true;
  147. var scr = document.createElement("script");
  148. var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com");
  149. scr.setAttribute('async', 'true');
  150. scr.type = "text/javascript";
  151. scr.src = host + "/j/roundtrip.js";
  152. ((document.getElementsByTagName('head') || [null])[0] ||
  153. document.getElementsByTagName('script')[0].parentNode).appendChild(scr);
  154. if(oldonload){oldonload()}};
  155. }());
  156. </script-->
  157. </body>
  158. </html>