-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
109 lines (82 loc) · 3.95 KB
/
Copy pathindex.html
File metadata and controls
109 lines (82 loc) · 3.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link href='https://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/github-dark.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>Pdfjinja by rammie</title>
</head>
<body>
<div id="container">
<div class="inner">
<header>
<h1>Pdfjinja</h1>
<h2>Use jinja templates to fill and sign pdf forms.</h2>
</header>
<section id="downloads" class="clearfix">
<a href="https://github.com/rammie/pdfjinja/zipball/master" id="download-zip" class="button"><span>Download .zip</span></a>
<a href="https://github.com/rammie/pdfjinja/tarball/master" id="download-tar-gz" class="button"><span>Download .tar.gz</span></a>
<a href="https://github.com/rammie/pdfjinja" id="view-on-github" class="button"><span>View on GitHub</span></a>
</section>
<hr>
<section id="main_content">
<p><a href="https://travis-ci.org/rammie/pdfjinja"><img src="https://api.travis-ci.org/rammie/pdfjinja.png?branch=master" alt="Travis Status"></a></p>
<p>Use jinja templates to fill and sign PDF forms.</p>
<p>You would like to fill out a PDF form using data from an external source such as a database or an excel file. Use a PDF editing software to edit the form. Use the tooltip field to specifiy a jinja template.</p>
<h2>
<a id="dependencies" class="anchor" href="#dependencies" aria-hidden="true"><span class="octicon octicon-link"></span></a>Dependencies</h2>
<p>OSX:</p>
<pre><code>brew install pdftk libtiff libjpeg webp little-cms2
</code></pre>
<p>Ubuntu:</p>
<pre><code>apt-get install python-dev python-pip libtiff5-dev libjpeg8-dev \
zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev \
tk8.6-dev python-tk pdftk libmagickwand-dev
</code></pre>
<h2>
<a id="installation" class="anchor" href="#installation" aria-hidden="true"><span class="octicon octicon-link"></span></a>Installation</h2>
<p>You can install pdfjinja with pip:</p>
<pre><code>$ pip install pdfjinja
$ pdfjinja -h
</code></pre>
<h2>
<a id="usage" class="anchor" href="#usage" aria-hidden="true"><span class="octicon octicon-link"></span></a>Usage:</h2>
<p>Command Line:</p>
<pre><code>$ pdfjinja -j input.json form.pdf filled.pdf
</code></pre>
<p>Python:</p>
<pre><code>from pdfjinja import PdfJinja
pdfjinja = PdfJinja('form.pdf')
pdfout = pdfjinja(dict(firstName='Faye', lastName='Valentine'))
pdfout.write(open('filled.pdf', 'wb'))
</code></pre>
<p>If you are using this with Flask as a webserver:</p>
<pre><code>from flask import current_app
pdfjinja = PdfJinja('form.pdf', current_app.jinja_env)
</code></pre>
<p>See examples/sample.form and examples/sample.json.</p>
</section>
<footer>
Pdfjinja is maintained by <a href="https://github.com/rammie">rammie</a><br>
This page was generated by <a href="https://pages.github.com">GitHub Pages</a>. Tactile theme by <a href="https://twitter.com/jasonlong">Jason Long</a>.
</footer>
<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-67001697-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</div>
</div>
</body>
</html>