Pdfserver is a webservice that offers common PDF operations like joining documents, selecting pages or "n pages on one".
Project description
Pdfserver is a webservice that offers common PDF operations like joining documents, selecting pages or “n pages on one”. It is built on top of the Python based microframework Flask and depends on pyPdf to manipulate PDFs.
Rationale
Powerful tools to manipulate PDF exist but they are not universally available on all systems or not simple to use. This server allows anyone to quickly solve most common PDF operations over the web.
If you don’t trust other servers with your data, deploy a copy yourself!
Example
See http://pdfserverapp.appspot.com/ for an example installation.
Dependencies
(see requirements.txt)
Python 2.5, http://www.python.org
Flask (tested on 0.6), http://flask.pocoo.org/
Flask-Babel, http://packages.python.org/Flask-Babel/
SQLAlchemy (probably >= 0.6.0), http://www.sqlalchemy.org/
pyPdf (tested with 1.12, but needs git~20091021 for “N pages on one”), http://pybrary.net/pyPdf/
Optionally
python-reportlab (tested with 2.4) for adding watermarks, http://www.reportlab.com/software/opensource/rl-toolkit/
Already included
jQuery & jQuery UI (tested with 1.8.4) (both already shipped with pdfserver), needs at least UI core, “Sortable” and “Dialog” from jQuery UI, http://jquery.com/
jQuery plugin: Validation, http://bassistance.de/jquery-plugins/jquery-plugin-validation/
Features
Simple, yet powerful
Designed to work with&without Javascript
N pages on one
Joining of files
Selecting pages & page ranges
Rotate pages
Add watermark to pages
Runs on the Google App Engine
Changes
0.3
Renamed to “pdfserver” from “django-pdfserver”
“N pages on one” feature
Move to Flask from Django
Google App Engine support
0.2.1
Page rotation
Watermark feature
Page range validation
Deploy
Install this application with:
$ python setup.py install pdfserver
You can simply run the development server with:
$ python run.py createdb $ mkdir uploads $ python run.py
General
Make sure the given upload directory and database can be written to and are not accessible from the outside (if on a public server).
When not in debug mode make sure to serve static files under static.
Give a SECRET_KEY and keep it secret so that sessions can be signed and users cannot see files uploaded by others.
Create the database by running in Python:
>>> from pdfserver import models, database; database.init_db()
Serve as CGI
See pdfserver.cgi for an example on how to run pdfserver through the traditional CGI interface.
Google App Engine
For pdfserver to run on the App Engine you need to download and copy dependencies locally:
# Get dependencies $ mkdir tmp $ pip install -r requirements.txt distribute --build=tmp --src=tmp \ --no-install --ignore-installed $ mv tmp/Babel/babel/ tmp/Flask/flask/ tmp/Flask-Babel/flaskext/ \ tmp/Jinja2/jinja2/ tmp/pypdf/pyPdf/ tmp/pytz/pytz \ tmp/speaklater/speaklater.py tmp/Werkzeug/werkzeug/ \ tmp/reportlab/src/reportlab/ tmp/distribute/pkg_resources.py . $ rm -rf tmp # Add a secret key $ $EDITOR appengine.py # Choose your application name $ $EDITOR app.yaml # Run the development server $ /usr/local/google_appengine/dev_appserver.py . # Finally upload $ /usr/local/google_appengine/appcfg.py update .
Contact
Please report bugs to http://github.com/cburgmer/pdfserver/issues.
Christoph Burgmer <cburgmer (at) ira uka de>
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.