diff --git a/README.rst b/README.rst index 2f4a8d2..f3f1bb0 100644 --- a/README.rst +++ b/README.rst @@ -55,7 +55,7 @@ All these commande line tools have a **-h** option that explains how to use them Licence ======= -This library is published under the BSD licence (same licence as `PyPDF2 `_ on which this lib depends). +This library is published under the BSD licence (same licence as `PyPDF4 `_ on which this lib depends). Contributors ============ @@ -65,6 +65,10 @@ Contributors Changelog ========= +* Version 1.0 dated 2019-01-26 + + * Use PyPDF4 instead of PyPDF2, because there are no new releases of PyPDF2 since May 2016 (cf https://github.com/mstamy2/PyPDF2/wiki/State-of-PyPDF2-and-Future-Plans), and we need a recent version of PyPDF2 to be able to generate fully compliant PDF/A-3 files. + * Version 0.9 dated 2019-01-25 * Port to python 3 contributed by JoshuaJan (https://github.com/joshuajan) diff --git a/facturx/facturx.py b/facturx/facturx.py index 4f88010..526d324 100644 --- a/facturx/facturx.py +++ b/facturx/facturx.py @@ -33,10 +33,10 @@ from io import BytesIO from lxml import etree from tempfile import NamedTemporaryFile from datetime import datetime -from PyPDF2 import PdfFileWriter, PdfFileReader -from PyPDF2.generic import DictionaryObject, DecodedStreamObject,\ +from PyPDF4 import PdfFileWriter, PdfFileReader +from PyPDF4.generic import DictionaryObject, DecodedStreamObject,\ NameObject, createStringObject, ArrayObject -from PyPDF2.utils import b_ +from PyPDF4.utils import b_ from pkg_resources import resource_filename import os.path import mimetypes @@ -287,7 +287,7 @@ def _prepare_pdf_metadata_xml(facturx_level, pdf_metadata): desc_adobe.set(ns_rdf + 'about', '') producer = etree.SubElement( desc_adobe, ns_pdf + 'Producer') - producer.text = 'PyPDF2' + producer.text = 'PyPDF4' desc_xmp = etree.SubElement( rdf, ns_rdf + 'Description', nsmap=nsmap_xmp) desc_xmp.set(ns_rdf + 'about', '') diff --git a/requirement.txt b/requirement.txt index 79b8b25..67bdef2 100644 --- a/requirement.txt +++ b/requirement.txt @@ -1,2 +1,2 @@ -PyPDF2 +PyPDF4 lxml