Debian packaging for PyPDF4
Go to file
Matt Wilkie eeb2b659aa Fails with "ValueError: not enough image data"
```
> python pdf-image-extractor.py ..\PDF_Samples\GeoBase_NHNC1_Data_Model_UML_EN.pdf
Traceback (most recent call last):
  File "pdf-image-extractor.py", line 33, in <module>
    img = Image.frombytes(mode, size, data)
  File "C:\Python27\ArcGIS10.3\lib\site-packages\PIL\Image.py", line 2047, in frombytes
    im.frombytes(data, decoder_name, args)
  File "C:\Python27\ArcGIS10.3\lib\site-packages\PIL\Image.py", line 731, in frombytes
    raise ValueError("not enough image data")
ValueError: not enough image data
```

Source:
http://ftp2.cits.rncan.gc.ca/pub/geobase/official/nhn_rhn/doc/

"""
All distributed data are subject to the Open Government Licence – Canada.

Canada grants to the licensee a non-exclusive, fully paid, royalty-free
right and licence to exercise all intellectual property rights in the
data. This includes the right to use, incorporate, sublicense (with
further right of sublicensing), modify, improve, further develop, and
distribute the Data; and to manufacture or distribute derivative
products.

-- http://www.nrcan.gc.ca/earth-sciences/geography/topographic-information/free-data-geogratis/licence/17285
"""
2016-01-06 11:40:14 -08:00
PDF_Samples Fails with "ValueError: not enough image data" 2016-01-06 11:40:14 -08:00
PyPDF2 JPEG 2000 filter added 2015-12-10 10:18:47 +01:00
Resources Started work on a test suite, added a test for loading and decoding a PDF file 2015-06-04 05:49:25 -04:00
Sample_Code Adding script 2014-12-30 16:07:55 -06:00
Scripts Extract images from PDF without resampling or altering. 2016-01-06 11:26:40 -08:00
Tests Adding unit tests for addJS. 2015-08-24 21:50:53 -04:00
.gitignore Merge branch 'gurulabs2' of http://dev.oak-tree.us/publishing/pypdf2 into roakes/gurulabs 2015-06-04 01:18:57 -04:00
CHANGELOG update changelog for patch 2015-07-20 15:11:09 -05:00
LICENSE pdfcat and pagerange.py: error handling, stdout, misc. 2014-01-09 15:18:21 -05:00
MANIFEST.in First commit 2011-12-30 09:04:56 -06:00
README.md Added instructions for running test suite 2015-06-04 05:48:05 -04:00
setup.py PEP8 fixes: mixed tabs / spaces, blank lines. 2014-11-26 22:43:35 +01:00

README.md

#PyPDF2

PyPDF2 is a pure-python PDF library capable of splitting, merging together, cropping, and transforming the pages of PDF files. It can also add custom data, viewing options, and passwords to PDF files. It can retrieve text and metadata from PDFs as well as merge entire files together.

Homepage
http://mstamy2.github.io/PyPDF2/

##Examples

Please see sample code folder

##Documentation

Documentation is available at
https://pythonhosted.org/PyPDF2/

##FAQ Please see
http://mstamy2.github.io/PyPDF2/FAQ.html

##Tests PyPDF2 includes a test suite built on the unittest framework. All tests are located in the "Tests" folder. Tests can be run from the command line by:

python -m unittest Tests.tests