jsPDF.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>jsPDF - Documentation</title>
  6. <script src="scripts/prettify/prettify.js"></script>
  7. <script src="scripts/prettify/lang-css.js"></script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
  13. </head>
  14. <body>
  15. <input type="checkbox" id="nav-trigger" class="nav-trigger" />
  16. <label for="nav-trigger" class="navicon-button x">
  17. <div class="navicon"></div>
  18. </label>
  19. <label for="nav-trigger" class="overlay"></label>
  20. <nav>
  21. <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsPDF.html">jsPDF</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addFont">addFont</a></li><li><a href="global.html#addHTML">addHTML</a></li><li><a href="global.html#addMetadata">addMetadata</a></li><li><a href="global.html#addPage">addPage</a></li><li><a href="global.html#autoPrint">autoPrint</a></li><li><a href="global.html#CapJoinStyles">CapJoinStyles</a></li><li><a href="global.html#circle">circle</a></li><li><a href="global.html#ellipse">ellipse</a></li><li><a href="global.html#getFontList">getFontList</a></li><li><a href="global.html#lines">lines</a></li><li><a href="global.html#lstext">lstext</a></li><li><a href="global.html#output">output</a></li><li><a href="global.html#rect">rect</a></li><li><a href="global.html#roundedRect">roundedRect</a></li><li><a href="global.html#save">save</a></li><li><a href="global.html#setDisplayMode">setDisplayMode</a></li><li><a href="global.html#setDrawColor">setDrawColor</a></li><li><a href="global.html#setFillColor">setFillColor</a></li><li><a href="global.html#setFont">setFont</a></li><li><a href="global.html#setFontSize">setFontSize</a></li><li><a href="global.html#setFontStyle">setFontStyle</a></li><li><a href="global.html#setLineCap">setLineCap</a></li><li><a href="global.html#setLineJoin">setLineJoin</a></li><li><a href="global.html#setLineWidth">setLineWidth</a></li><li><a href="global.html#setPage">setPage</a></li><li><a href="global.html#setProperties">setProperties</a></li><li><a href="global.html#setTextColor">setTextColor</a></li><li><a href="global.html#text">text</a></li><li><a href="global.html#triangle">triangle</a></li></ul>
  22. </nav>
  23. <div id="main">
  24. <h1 class="page-title">jsPDF</h1>
  25. <section>
  26. <header>
  27. <h2>
  28. jsPDF
  29. </h2>
  30. </header>
  31. <article>
  32. <div class="container-overview">
  33. <h4 class="name" id="jsPDF"><span class="type-signature"></span>new jsPDF<span class="signature">(orientation, unit, format)</span><span class="type-signature"> &rarr; {<a href="jsPDF.html">jsPDF</a>}</span></h4>
  34. <dl class="details">
  35. <dt class="tag-source">Source:</dt>
  36. <dd class="tag-source"><ul class="dummy"><li>
  37. <a href="jspdf.js.html">jspdf.js</a>, <a href="jspdf.js.html#line47">line 47</a>
  38. </li></ul></dd>
  39. </dl>
  40. <div class="description">
  41. <p>Creates new jsPDF document object instance.</p>
  42. </div>
  43. <h5>Parameters:</h5>
  44. <table class="params">
  45. <thead>
  46. <tr>
  47. <th>Name</th>
  48. <th>Type</th>
  49. <th class="last">Description</th>
  50. </tr>
  51. </thead>
  52. <tbody>
  53. <tr>
  54. <td class="name"><code>orientation</code></td>
  55. <td class="type">
  56. </td>
  57. <td class="description last"><p>One of &quot;portrait&quot; or &quot;landscape&quot; (or shortcuts &quot;p&quot; (Default), &quot;l&quot;)</p></td>
  58. </tr>
  59. <tr>
  60. <td class="name"><code>unit</code></td>
  61. <td class="type">
  62. </td>
  63. <td class="description last"><p>Measurement unit to be used when coordinates are specified.
  64. One of &quot;pt&quot; (points), &quot;mm&quot; (Default), &quot;cm&quot;, &quot;in&quot;</p></td>
  65. </tr>
  66. <tr>
  67. <td class="name"><code>format</code></td>
  68. <td class="type">
  69. </td>
  70. <td class="description last"><p>One of 'pageFormats' as shown below, default: a4</p></td>
  71. </tr>
  72. </tbody>
  73. </table>
  74. <h5>Returns:</h5>
  75. <dl class="param-type">
  76. <dt>
  77. Type
  78. </dt>
  79. <dd>
  80. <span class="param-type"><a href="jsPDF.html">jsPDF</a></span>
  81. </dd>
  82. </dl>
  83. </div>
  84. <h3 class="subsection-title">Members</h3>
  85. <h4 class="name" id=".API"><span class="type-signature">(static) </span>API<span class="type-signature"></span></h4>
  86. <dl class="details">
  87. <dt class="tag-source">Source:</dt>
  88. <dd class="tag-source"><ul class="dummy"><li>
  89. <a href="jspdf.js.html">jspdf.js</a>, <a href="jspdf.js.html#line2217">line 2217</a>
  90. </li></ul></dd>
  91. </dl>
  92. <div class="description">
  93. <p>jsPDF.API is a STATIC property of jsPDF class.
  94. jsPDF.API is an object you can add methods and properties to.
  95. The methods / properties you add will show up in new jsPDF objects.</p>
  96. <p>One property is prepopulated. It is the 'events' Object. Plugin authors can add topics,
  97. callbacks to this object. These will be reassigned to all new instances of jsPDF.
  98. Examples:
  99. jsPDF.API.events['initialized'] = function(){ 'this' is API object }
  100. jsPDF.API.events['addFont'] = function(added_font_object){ 'this' is API object }</p>
  101. </div>
  102. <h5>Example</h5>
  103. <pre class="prettyprint"><code>jsPDF.API.mymethod = function(){
  104. // 'this' will be ref to internal API object. see jsPDF source
  105. // , so you can refer to built-in methods like so:
  106. // this.line(....)
  107. // this.text(....)
  108. }
  109. var pdfdoc = new jsPDF()
  110. pdfdoc.mymethod() // &lt;- !!!!!!</code></pre>
  111. </article>
  112. </section>
  113. </div>
  114. <br class="clear">
  115. <footer>
  116. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.2</a> on Sun Oct 09 2016 11:08:27 GMT+0100 (BST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
  117. </footer>
  118. <script>prettyPrint();</script>
  119. <script src="scripts/linenumber.js"></script>
  120. </body>
  121. </html>