This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
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)

Optionally

Already included

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
  • Handle builds asynchronously

Changes

0.6

  • Use SQLAlchemy broker backend for celery by default
  • Fix breakage due to incompatible Flask change
  • Fix test for ordering of uploaded files

0.5

  • Fix setup.py statics
  • Show warning if cookies not enabled
  • Update pyPdf dependency
  • Enable testing for celery task backend

0.4

  • Handle upload and remove actions through Ajax
  • Support for asynchronous PDF generation
  • Fix max upload size handling for App Engine
  • Unittests
  • Action messages

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

Download and extract the soure code.

Create a virtualenv in the extracted folder and install requirements:

$ virtualenv env
$ source env/bin/activate
$ pip install -r requirements.txt

You can simply run the development server with:

$ python manage.py createdb
$ mkdir uploads
$ python manage.py runserver

General

  1. Make sure the given upload directory and database can be written to and are not accessible from the outside (if on a public server).

  2. When not in debug mode make sure to serve static files under static.

  3. Give a SECRET_KEY and keep it secret so that sessions can be signed and users cannot see files uploaded by others.

  4. Create the database by running:

    $ python manage.py createdb
    

Celery

For optional, asynchronous generation of the resulting PDF install celery and kombu-sqlalchemy (you may also use default broker RabbitMQ, see http://celeryq.org/docs/getting-started/broker-installation.html):

$ pip install -r celery_requirements.txt

Run celeryd from the project’s directory to handle tasks asynchronously:

$ celeryd

The Google App Engine has its own dereferred library which is automatically used.

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. Run the following in the extracted folder:

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

If tasks won’t get executed (you can check under http://localhost:8080/_ah/admin/tasks?queue=default), you might got hitten by bug http://code.google.com/p/appengine-mapreduce/issues/detail?id=9, see workaround there.

Contact

Please report bugs to http://github.com/cburgmer/pdfserver/issues.

Christoph Burgmer <cburgmer (at) ira uka de>

Release History

Release History

0.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pdfserver-0.6.tar.gz (145.4 kB) Copy SHA256 Checksum SHA256 Source Mar 11, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting