Skip to content

Commit

Permalink
Use PyPDF2, which is an advanced fork of PyPDF.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Wenzel committed Feb 13, 2014
1 parent 552736b commit cdf1fd3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
9 changes: 4 additions & 5 deletions README.md
Expand Up @@ -8,10 +8,9 @@ PDF documents from the command line.

History
-------
PDFtk was written in Java and C++, and
is natively compiled with gcj. Sadly, it has been discontinued a few years ago
and bitrot is setting in (e.g., it does not compile easily on a number of
platforms).
PDFtk was written in Java and C++, and is natively compiled with gcj. Sadly,
it has been discontinued a few years ago and bitrot is setting in (e.g.,
it does not compile easily on a number of platforms).

Philip Stark decided to look for an alternative and found pypdf, a PDF library
written in pure Python. He couldn't find a tool which actually used the
Expand All @@ -27,7 +26,7 @@ feel free to fork and send me a pull request.
License
-------
Stapler version 0.2 was written in 2009 by Philip Stark.
Stapler version 0.3 was written in 2010 by Fred Wenzel.
Stapler version 0.3 and later were written from 2010--today by Fred Wenzel.

For a list of contributors, check the ``CONTRIBUTORS`` file.

Expand Down
4 changes: 1 addition & 3 deletions requirements.txt
@@ -1,3 +1 @@
# check out Python 2.6 compatible pyPdf version
#pyPdf==1.12
-e git://github.com/mfenniak/pyPdf.git@8ef3142806d482d84cedcde7808dc322d9d0e4a7#egg=pyPdf-1.12-py2.6-trunk
PyPDF2==1.20
2 changes: 1 addition & 1 deletion staplelib/commands.py
Expand Up @@ -3,7 +3,7 @@
import math
import os.path

from pyPdf import PdfFileWriter, PdfFileReader
from PyPDF2 import PdfFileWriter, PdfFileReader

from . import CommandError, iohelper
import staplelib
Expand Down
2 changes: 1 addition & 1 deletion staplelib/iohelper.py
Expand Up @@ -5,7 +5,7 @@
import re
import sys

from pyPdf import PdfFileWriter, PdfFileReader
from PyPDF2 import PdfFileWriter, PdfFileReader

from . import CommandError
import staplelib
Expand Down
2 changes: 2 additions & 0 deletions staplelib/stapler.py
Expand Up @@ -34,6 +34,7 @@
respectively. (e.g., 1-15R)
""".strip()


# command line option parser
parser = OptionParser(usage=USAGE)
parser.add_option('-o', '--ownerpw', action='store', dest='ownerpw',
Expand All @@ -45,6 +46,7 @@
parser.add_option('-v', '--verbose', action='store_true', dest='verbose',
default=False)


def main():
"""
Handle all command line arguments and pass them on to the respective
Expand Down
2 changes: 1 addition & 1 deletion staplelib/tests.py
Expand Up @@ -6,7 +6,7 @@
import tempfile
import unittest

from pyPdf import PdfFileReader
from PyPDF2 import PdfFileReader


HERE = os.path.abspath(os.path.dirname(__file__))
Expand Down

0 comments on commit cdf1fd3

Please sign in to comment.