123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <meta name="generator" content="JsDoc Toolkit" />
-
- <title>JsDoc Reference - jsPDF</title>
- <style type="text/css">
- /* default.css */
- body
- {
- font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
- width: 800px;
- }
- .header
- {
- clear: both;
- background-color: #ccc;
- padding: 8px;
- }
- h1
- {
- font-size: 150%;
- font-weight: bold;
- padding: 0;
- margin: 1em 0 0 .3em;
- }
- hr
- {
- border: none 0;
- border-top: 1px solid #7F8FB1;
- height: 1px;
- }
- pre.code
- {
- display: block;
- padding: 8px;
- border: 1px dashed #ccc;
- }
- #index
- {
- margin-top: 24px;
- float: left;
- width: 160px;
- position: absolute;
- left: 8px;
- background-color: #F3F3F3;
- padding: 8px;
- }
- #content
- {
- margin-left: 190px;
- width: 600px;
- }
- .classList
- {
- list-style-type: none;
- padding: 0;
- margin: 0 0 0 8px;
- font-family: arial, sans-serif;
- font-size: 1em;
- overflow: auto;
- }
- .classList li
- {
- padding: 0;
- margin: 0 0 8px 0;
- }
- .summaryTable { width: 100%; }
- h1.classTitle
- {
- font-size:170%;
- line-height:130%;
- }
- h2 { font-size: 110%; }
- caption, div.sectionTitle
- {
- background-color: #7F8FB1;
- color: #fff;
- font-size:130%;
- text-align: left;
- padding: 2px 6px 2px 6px;
- border: 1px #7F8FB1 solid;
- }
- div.sectionTitle { margin-bottom: 8px; }
- .summaryTable thead { display: none; }
- .summaryTable td
- {
- vertical-align: top;
- padding: 4px;
- border-bottom: 1px #7F8FB1 solid;
- border-right: 1px #7F8FB1 solid;
- }
- /*col#summaryAttributes {}*/
- .summaryTable td.attributes
- {
- border-left: 1px #7F8FB1 solid;
- width: 140px;
- text-align: right;
- }
- td.attributes, .fixedFont
- {
- line-height: 15px;
- color: #002EBE;
- font-family: "Courier New",Courier,monospace;
- font-size: 13px;
- }
- .summaryTable td.nameDescription
- {
- text-align: left;
- font-size: 13px;
- line-height: 15px;
- }
- .summaryTable td.nameDescription, .description
- {
- line-height: 15px;
- padding: 4px;
- padding-left: 4px;
- }
- .summaryTable { margin-bottom: 8px; }
- ul.inheritsList
- {
- list-style: square;
- margin-left: 20px;
- padding-left: 0;
- }
- .detailList {
- margin-left: 20px;
- line-height: 15px;
- }
- .detailList dt { margin-left: 20px; }
- .detailList .heading
- {
- font-weight: bold;
- padding-bottom: 6px;
- margin-left: 0;
- }
- .light, td.attributes, .light a:link, .light a:visited
- {
- color: #777;
- font-style: italic;
- }
- .fineprint
- {
- text-align: right;
- font-size: 10px;
- }
- </style>
- </head>
- <body>
- <!-- ============================== header ================================= -->
- <!-- begin static/header.html -->
- <div id="header">
- </div>
- <!-- end static/header.html -->
- <!-- ============================== classes index ============================ -->
- <div id="index">
- <!-- begin publish.classesIndex -->
- <div align="center"><a href="../index.html">Class Index</a>
- | <a href="../files.html">File Index</a></div>
- <hr />
- <h2>Classes</h2>
- <ul class="classList">
-
- <li><i><a href="../symbols/_global_.html">_global_</a></i></li>
-
- <li><a href="../symbols/FontObject.html">FontObject</a></li>
-
- <li><a href="../symbols/jsPDF.html">jsPDF</a></li>
-
- <li><a href="../symbols/PubSub.html">PubSub</a></li>
-
- </ul>
- <hr />
- <!-- end publish.classesIndex -->
- </div>
-
- <div id="content">
- <!-- ============================== class title ============================ -->
- <h1 class="classTitle">
-
- Class jsPDF
- </h1>
- <!-- ============================== class summary ========================== -->
- <p class="description">
-
-
-
-
-
-
- <br /><i>Defined in: </i> <a href="../symbols/src/c__work_jsPDF_jspdf.js.html">jspdf.js</a>.
-
- </p>
- <!-- ============================== constructor summary ==================== -->
-
- <table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class jsPDF.">
- <caption>Class Summary</caption>
- <thead>
- <tr>
- <th scope="col">Constructor Attributes</th>
- <th scope="col">Constructor Name and Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription" >
- <div class="fixedFont">
- <b><a href="../symbols/jsPDF.html#constructor">jsPDF</a></b>(orientation, unit, format)
- </div>
- <div class="description">Creates new jsPDF document object instance</div>
- </td>
- </tr>
- </tbody>
- </table>
-
- <!-- ============================== properties summary ===================== -->
-
-
-
- <table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class jsPDF.">
- <caption>Field Summary</caption>
- <thead>
- <tr>
- <th scope="col">Field Attributes</th>
- <th scope="col">Field Name and Description</th>
- </tr>
- </thead>
- <tbody>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont">
- jsPDF.<b><a href="../symbols/jsPDF.html#.API">API</a></b>
- </div>
- <div class="description">jsPDF.API is a STATIC property of jsPDF class.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont">
- <b><a href="../symbols/jsPDF.html#CapJoinStyles">CapJoinStyles</a></b>
- </div>
- <div class="description">Is an Object providing a mapping from human-readable to
- integer flag values designating the varieties of line cap
- and join styles.</div>
- </td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <!-- ============================== methods summary ======================== -->
-
-
-
- <table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class jsPDF.">
- <caption>Method Summary</caption>
- <thead>
- <tr>
- <th scope="col">Method Attributes</th>
- <th scope="col">Method Name and Description</th>
- </tr>
- </thead>
- <tbody>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#addPage">addPage</a></b>()
- </div>
- <div class="description">Adds (and transfers the focus to) new page to the PDF document.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#circle">circle</a></b>(x, y, r, style)
- </div>
- <div class="description">Adds an circle to PDF</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#ellipse">ellipse</a></b>(x, y, rx, rx, style)
- </div>
- <div class="description">Adds an ellipse to PDF</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#getFontList">getFontList</a></b>()
- </div>
- <div class="description">Returns an object - a tree of fontName to fontStyle relationships available to
- active PDF document.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#lines">lines</a></b>(lines, x, y, scale)
- </div>
- <div class="description">Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#output">output</a></b>(type, options)
- </div>
- <div class="description">Generates the PDF document.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#rect">rect</a></b>(x, y, w, h, style)
- </div>
- <div class="description">Adds a rectangle to PDF</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#setDrawColor">setDrawColor</a></b>(ch1, ch2, ch3, ch4)
- </div>
- <div class="description">Sets the stroke color for upcoming elements.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#setFillColor">setFillColor</a></b>(ch1, ch2, ch3, ch4)
- </div>
- <div class="description">Sets the fill color for upcoming elements.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#setFont">setFont</a></b>(fontName, fontStyle)
- </div>
- <div class="description">Sets text font face, variant for upcoming text elements.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#setFontSize">setFontSize</a></b>(size)
- </div>
- <div class="description">Sets font size for upcoming text elements.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#setFontStyle">setFontStyle</a></b>(style)
- </div>
- <div class="description">Switches font style or variant for upcoming text elements,
- while keeping the font face or family same.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#setLineCap">setLineCap</a></b>(style)
- </div>
- <div class="description">Sets the line cap styles
- See {jsPDF.CapJoinStyles} for variants</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#setLineJoin">setLineJoin</a></b>(style)
- </div>
- <div class="description">Sets the line join styles
- See {jsPDF.CapJoinStyles} for variants</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#setLineWidth">setLineWidth</a></b>(width)
- </div>
- <div class="description">Sets line width for upcoming lines.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#setProperties">setProperties</a></b>(A)
- </div>
- <div class="description">Adds a properties to the PDF document</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#setTextColor">setTextColor</a></b>(r, g, b)
- </div>
- <div class="description">Sets the text color for upcoming elements.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#text">text</a></b>(text, x, y, flags)
- </div>
- <div class="description">Adds text to page.</div>
- </td>
- </tr>
-
- <tr>
- <td class="attributes"> </td>
- <td class="nameDescription">
- <div class="fixedFont"><b><a href="../symbols/jsPDF.html#triangle">triangle</a></b>(x1, y1, x2, y2, x3, y3, style)
- </div>
- <div class="description">Adds a triangle to PDF</div>
- </td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <!-- ============================== events summary ======================== -->
-
- <!-- ============================== constructor details ==================== -->
-
- <div class="details"><a name="constructor"> </a>
- <div class="sectionTitle">
- Class Detail
- </div>
-
- <div class="fixedFont">
- <b>jsPDF</b>(orientation, unit, format)
- </div>
-
- <div class="description">
- Creates new jsPDF document object instance
-
- </div>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <b>orientation</b>
-
- </dt>
- <dd>One of "portrait" or "landscape" (or shortcuts "p" (Default), "l")</dd>
-
- <dt>
- <b>unit</b>
-
- </dt>
- <dd>Measurement unit to be used when coordinates are specified. One of "pt" (points), "mm" (Default), "cm", "in"</dd>
-
- <dt>
- <b>format</b>
-
- </dt>
- <dd>One of 'a3', 'a4' (Default),'a5' ,'letter' ,'legal'</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- </div>
-
- <!-- ============================== field details ========================== -->
-
- <div class="sectionTitle">
- Field Detail
- </div>
-
- <a name=".API"> </a>
- <div class="fixedFont">
-
-
- <span class="light">jsPDF.</span><b>API</b>
-
- </div>
- <div class="description">
- jsPDF.API is a STATIC property of jsPDF class.
- jsPDF.API is an object you can add methods and properties to.
- The methods / properties you add will show up in new jsPDF objects.
- One property is prepopulated. It is the 'events' Object. Plugin authors can add topics, callbacks to this object. These will be reassigned to all new instances of jsPDF.
- Examples:
- jsPDF.API.events['initialized'] = function(){ 'this' is API object }
- jsPDF.API.events['addFont'] = function(added_font_object){ 'this' is API object }
-
-
- </div>
-
-
-
- <pre class="code"> jsPDF.API.mymethod = function(){
- // 'this' will be ref to internal API object. see jsPDF source
- // , so you can refer to built-in methods like so:
- // this.line(....)
- // this.text(....)
- }
- var pdfdoc = new jsPDF()
- pdfdoc.mymethod() // <- !!!!!!</pre>
-
-
-
-
-
-
- <hr />
-
- <a name="CapJoinStyles"> </a>
- <div class="fixedFont">
-
- <span class="light">{Object}</span>
- <b>CapJoinStyles</b>
-
- </div>
- <div class="description">
- Is an Object providing a mapping from human-readable to
- integer flag values designating the varieties of line cap
- and join styles.
-
-
- </div>
-
-
-
-
-
-
-
-
-
- <!-- ============================== method details ========================= -->
-
- <div class="sectionTitle">
- Method Detail
- </div>
-
- <a name="addPage"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>addPage</b>()
-
- </div>
- <div class="description">
- Adds (and transfers the focus to) new page to the PDF document.
-
-
- </div>
-
-
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="circle"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>circle</b>(x, y, r, style)
-
- </div>
- <div class="description">
- Adds an circle to PDF
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>x</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against left edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>y</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against upper edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>r</b>
-
- </dt>
- <dd>Radius (in units declared at inception of PDF document)</dd>
-
- <dt>
- <span class="light fixedFont">{String}</span> <b>style</b>
-
- </dt>
- <dd>(Defaults to active fill/stroke style) A string signalling if stroke, fill or both are to be applied.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="ellipse"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>ellipse</b>(x, y, rx, rx, style)
-
- </div>
- <div class="description">
- Adds an ellipse to PDF
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>x</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against left edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>y</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against upper edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>rx</b>
-
- </dt>
- <dd>Radius along x axis (in units declared at inception of PDF document)</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>rx</b>
-
- </dt>
- <dd>Radius along y axis (in units declared at inception of PDF document)</dd>
-
- <dt>
- <span class="light fixedFont">{String}</span> <b>style</b>
-
- </dt>
- <dd>(Defaults to active fill/stroke style) A string signalling if stroke, fill or both are to be applied.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="getFontList"> </a>
- <div class="fixedFont">
-
- <span class="light">{Object}</span>
- <b>getFontList</b>()
-
- </div>
- <div class="description">
- Returns an object - a tree of fontName to fontStyle relationships available to
- active PDF document.
-
-
- </div>
-
-
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{Object}</span> Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... }</dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="lines"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>lines</b>(lines, x, y, scale)
-
- </div>
- <div class="description">
- Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.
- All data points in `lines` are relative to last line origin.
- `x`, `y` become x1,y1 for first line / curve in the set.
- For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.
- For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.
-
-
- </div>
-
-
-
- <pre class="code">.lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, 10) // line, line, bezier curve, line</pre>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{Array}</span> <b>lines</b>
-
- </dt>
- <dd>Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>x</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against left edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>y</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against upper edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>scale</b>
-
- </dt>
- <dd>(Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="output"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>output</b>(type, options)
-
- </div>
- <div class="description">
- Generates the PDF document.
- Possible values:
- datauristring (alias dataurlstring) - Data-Url-formatted data returned as string.
- datauri (alias datauri) - Data-Url-formatted data pushed into current window's location (effectively reloading the window with contents of the PDF).
-
- If `type` argument is undefined, output is raw body of resulting PDF returned as a string.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{String}</span> <b>type</b>
-
- </dt>
- <dd>A string identifying one of the possible output types.</dd>
-
- <dt>
- <span class="light fixedFont">{Object}</span> <b>options</b>
-
- </dt>
- <dd>An object providing some additional signalling to PDF generator.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="rect"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>rect</b>(x, y, w, h, style)
-
- </div>
- <div class="description">
- Adds a rectangle to PDF
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>x</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against left edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>y</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against upper edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>w</b>
-
- </dt>
- <dd>Width (in units declared at inception of PDF document)</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>h</b>
-
- </dt>
- <dd>Height (in units declared at inception of PDF document)</dd>
-
- <dt>
- <span class="light fixedFont">{String}</span> <b>style</b>
-
- </dt>
- <dd>(Defaults to active fill/stroke style) A string signalling if stroke, fill or both are to be applied.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="setDrawColor"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>setDrawColor</b>(ch1, ch2, ch3, ch4)
-
- </div>
- <div class="description">
- Sets the stroke color for upcoming elements.
- Depending on the number of arguments given, Gray, RGB, or CMYK
- color space is implied.
- When only ch1 is given, "Gray" color space is implied and it
- must be a value in the range from 0.00 (solid black) to to 1.00 (white)
- if values are communicated as String types, or in range from 0 (black)
- to 255 (white) if communicated as Number type.
- The RGB-like 0-255 range is provided for backward compatibility.
- When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
- value must be in the range from 0.00 (minimum intensity) to to 1.00
- (max intensity) if values are communicated as String types, or
- from 0 (min intensity) to to 255 (max intensity) if values are communicated
- as Number types.
- The RGB-like 0-255 range is provided for backward compatibility.
- When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
- value must be a in the range from 0.00 (0% concentration) to to
- 1.00 (100% concentration)
- Because JavaScript treats fixed point numbers badly (rounds to
- floating point nearest to binary representation) it is highly advised to
- communicate the fractional numbers as String types, not JavaScript Number type.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{Number|String}</span> <b>ch1</b>
-
- </dt>
- <dd>Color channel value</dd>
-
- <dt>
- <span class="light fixedFont">{Number|String}</span> <b>ch2</b>
-
- </dt>
- <dd>Color channel value</dd>
-
- <dt>
- <span class="light fixedFont">{Number|String}</span> <b>ch3</b>
-
- </dt>
- <dd>Color channel value</dd>
-
- <dt>
- <span class="light fixedFont">{Number|String}</span> <b>ch4</b>
-
- </dt>
- <dd>Color channel value</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="setFillColor"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>setFillColor</b>(ch1, ch2, ch3, ch4)
-
- </div>
- <div class="description">
- Sets the fill color for upcoming elements.
-
- Depending on the number of arguments given, Gray, RGB, or CMYK
- color space is implied.
- When only ch1 is given, "Gray" color space is implied and it
- must be a value in the range from 0.00 (solid black) to to 1.00 (white)
- if values are communicated as String types, or in range from 0 (black)
- to 255 (white) if communicated as Number type.
- The RGB-like 0-255 range is provided for backward compatibility.
- When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
- value must be in the range from 0.00 (minimum intensity) to to 1.00
- (max intensity) if values are communicated as String types, or
- from 0 (min intensity) to to 255 (max intensity) if values are communicated
- as Number types.
- The RGB-like 0-255 range is provided for backward compatibility.
- When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
- value must be a in the range from 0.00 (0% concentration) to to
- 1.00 (100% concentration)
- Because JavaScript treats fixed point numbers badly (rounds to
- floating point nearest to binary representation) it is highly advised to
- communicate the fractional numbers as String types, not JavaScript Number type.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{Number|String}</span> <b>ch1</b>
-
- </dt>
- <dd>Color channel value</dd>
-
- <dt>
- <span class="light fixedFont">{Number|String}</span> <b>ch2</b>
-
- </dt>
- <dd>Color channel value</dd>
-
- <dt>
- <span class="light fixedFont">{Number|String}</span> <b>ch3</b>
-
- </dt>
- <dd>Color channel value</dd>
-
- <dt>
- <span class="light fixedFont">{Number|String}</span> <b>ch4</b>
-
- </dt>
- <dd>Color channel value</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="setFont"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>setFont</b>(fontName, fontStyle)
-
- </div>
- <div class="description">
- Sets text font face, variant for upcoming text elements.
- See output of jsPDF.getFontList() for possible font names, styles.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{String}</span> <b>fontName</b>
-
- </dt>
- <dd>Font name or family. Example: "times"</dd>
-
- <dt>
- <span class="light fixedFont">{String}</span> <b>fontStyle</b>
-
- </dt>
- <dd>Font style or variant. Example: "italic"</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="setFontSize"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>setFontSize</b>(size)
-
- </div>
- <div class="description">
- Sets font size for upcoming text elements.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>size</b>
-
- </dt>
- <dd>Font size in points.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="setFontStyle"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>setFontStyle</b>(style)
-
- </div>
- <div class="description">
- Switches font style or variant for upcoming text elements,
- while keeping the font face or family same.
- See output of jsPDF.getFontList() for possible font names, styles.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{String}</span> <b>style</b>
-
- </dt>
- <dd>Font style or variant. Example: "italic"</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="setLineCap"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>setLineCap</b>(style)
-
- </div>
- <div class="description">
- Sets the line cap styles
- See {jsPDF.CapJoinStyles} for variants
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{String|Number}</span> <b>style</b>
-
- </dt>
- <dd>A string or number identifying the type of line cap</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="setLineJoin"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>setLineJoin</b>(style)
-
- </div>
- <div class="description">
- Sets the line join styles
- See {jsPDF.CapJoinStyles} for variants
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{String|Number}</span> <b>style</b>
-
- </dt>
- <dd>A string or number identifying the type of line join</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="setLineWidth"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>setLineWidth</b>(width)
-
- </div>
- <div class="description">
- Sets line width for upcoming lines.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>width</b>
-
- </dt>
- <dd>Line width (in units declared at inception of PDF document)</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="setProperties"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>setProperties</b>(A)
-
- </div>
- <div class="description">
- Adds a properties to the PDF document
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{Object}</span> <b>A</b>
-
- </dt>
- <dd>property_name-to-property_value object structure.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="setTextColor"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>setTextColor</b>(r, g, b)
-
- </div>
- <div class="description">
- Sets the text color for upcoming elements.
- If only one, first argument is given,
- treats the value as gray-scale color value.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>r</b>
-
- </dt>
- <dd>Red channel color value in range 0-255</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>g</b>
-
- </dt>
- <dd>Green channel color value in range 0-255</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>b</b>
-
- </dt>
- <dd>Blue channel color value in range 0-255</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="text"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>text</b>(text, x, y, flags)
-
- </div>
- <div class="description">
- Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{String|Array}</span> <b>text</b>
-
- </dt>
- <dd>String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>x</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against left edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>y</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against upper edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{Object}</span> <b>flags</b>
-
- </dt>
- <dd>Collection of settings signalling how the text must be encoded. Defaults are sane. If you think you want to pass some flags, you likely can read the source.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
- <hr />
-
- <a name="triangle"> </a>
- <div class="fixedFont">
-
- <span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
- <b>triangle</b>(x1, y1, x2, y2, x3, y3, style)
-
- </div>
- <div class="description">
- Adds a triangle to PDF
-
-
- </div>
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>x1</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against left edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>y1</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against upper edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>x2</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against left edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>y2</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against upper edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>x3</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against left edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{Number}</span> <b>y3</b>
-
- </dt>
- <dd>Coordinate (in units declared at inception of PDF document) against upper edge of the page</dd>
-
- <dt>
- <span class="light fixedFont">{String}</span> <b>style</b>
-
- </dt>
- <dd>(Defaults to active fill/stroke style) A string signalling if stroke, fill or both are to be applied.</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="light fixedFont">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span> </dd>
-
- </dl>
-
-
-
-
-
-
-
- <!-- ============================== event details ========================= -->
-
-
- <hr />
- </div>
-
- <!-- ============================== footer ================================= -->
- <div class="fineprint" style="clear:both">
-
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Oct 15 2012 22:41:49 GMT-0700 (PDT)
- </div>
- </body>
- </html>
|