Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRio committed Jan 7, 2013
2 parents bf09e86 + b840e03 commit 2c136e6
Showing 1 changed file with 117 additions and 2 deletions.
119 changes: 117 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<!DOCTYPE html>
<html lang="en">
<head>
Expand Down Expand Up @@ -187,4 +186,120 @@ <h2>License</h2>
</script>

</body>
</html>
</html>
=======
<!DOCTYPE html>
<html>

<head>
<meta charset='utf-8' />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="description" content="jsPDF : Generating PDF files purely in Javascript" />

<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">

<title>jsPDF</title>
</head>

<body>

<!-- HEADER -->
<div id="header_wrap" class="outer">
<header class="inner">
<a id="forkme_banner" href="https://github.com/MrRio/jsPDF">View on GitHub</a>

<h1 id="project_title">jsPDF</h1>
<h2 id="project_tagline">Generating PDF files purely in Javascript</h2>

<section id="downloads">
<a class="zip_download_link" href="https://github.com/MrRio/jsPDF/zipball/master">Download this project as a .zip file</a>
<a class="tar_download_link" href="https://github.com/MrRio/jsPDF/tarball/master">Download this project as a tar.gz file</a>
</section>
</header>
</div>

<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="main_content" class="inner">
<p>You can <a href="http://twitter.com/MrRio">catch me on twitter</a>: <a href="http://twitter.com/MrRio">@MrRio</a> or head over to <a href="http://snapshotmedia.co.uk">my company's website</a> for consultancy. </p>

<h2>Creating your first document</h2>

<p>See examples/basic.html. Make sure you include BlobBuilder.js and FileSaver.js. </p>

<div class="highlight"><pre>
<span class="kd">var</span> <span class="nx">doc</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">jsPDF</span><span class="p">();</span>
<span class="nx">doc</span><span class="p">.</span><span class="nx">text</span><span class="p">(</span><span class="mi">20</span><span class="p">,</span> <span class="mi">20</span><span class="p">,</span> <span class="s1">'Hello world.'</span><span class="p">);</span>
<span class="nx">doc</span><span class="p">.</span><span class="nx">save</span><span class="p">(</span><span class="s1">'Test.pdf'</span><span class="p">);</span>
</pre></div>

<h2>Demo</h2>

<h3>Simple two-page text document</h3>

<div class="highlight"><pre><span class="kd">var</span> <span class="nx">doc</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">jsPDF</span><span class="p">();</span>
<span class="nx">doc</span><span class="p">.</span><span class="nx">text</span><span class="p">(</span><span class="mi">20</span><span class="p">,</span> <span class="mi">20</span><span class="p">,</span> <span class="s1">'Hello world!'</span><span class="p">);</span>
<span class="nx">doc</span><span class="p">.</span><span class="nx">text</span><span class="p">(</span><span class="mi">20</span><span class="p">,</span> <span class="mi">30</span><span class="p">,</span> <span class="s1">'This is client-side Javascript, creating a PDF.'</span><span class="p">);</span>
<span class="nx">doc</span><span class="p">.</span><span class="nx">addPage</span><span class="p">();</span>
<span class="nx">doc</span><span class="p">.</span><span class="nx">text</span><span class="p">(</span><span class="mi">20</span><span class="p">,</span> <span class="mi">20</span><span class="p">,</span> <span class="s1">'Do you like that?'</span><span class="p">);</span>

<span class="nx">doc</span><span class="p">.</span><span class="nx">save</span><span class="p">(</span><span class="s1">'Test.pdf'</span><span class="p">);</span>
</pre></div>

<h2>Credits</h2>

<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>

<p>Thanks to Ajaxian.com for <a href="http://ajaxian.com/archives/dynamically-generic-pdfs-with-javascript">featuring us back in 2009</a>.</p>

<p>Everyone else that's contributed patches or bug reports. You rock.</p>

<h2>License</h2>

<p>(MIT License)</p>

<p>Copyright (c) 2010-2012 James Hall, <a href="https://github.com/MrRio/jsPDF">https://github.com/MrRio/jsPDF</a></p>

<p>Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:</p>

<p>The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
</section>
</div>

<!-- FOOTER -->
<div id="footer_wrap" class="outer">
<footer class="inner">
<p class="copyright">jsPDF maintained by <a href="https://github.com/MrRio">MrRio</a></p>
<p>Published with <a href="http://pages.github.com">GitHub Pages</a></p>
</footer>
</div>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-32767308-2");
pageTracker._trackPageview();
} catch(err) {}
</script>


</body>
</html>

0 comments on commit 2c136e6

Please sign in to comment.