Switch to PyPDF4, cf explainations in README

Prepare 1.0 release
This commit is contained in:
Alexis de Lattre 2019-01-26 23:44:12 +01:00
parent 5080fea089
commit 0fbe504610
3 changed files with 10 additions and 6 deletions

View File

@ -55,7 +55,7 @@ All these commande line tools have a **-h** option that explains how to use them
Licence Licence
======= =======
This library is published under the BSD licence (same licence as `PyPDF2 <http://mstamy2.github.io/PyPDF2/>`_ on which this lib depends). This library is published under the BSD licence (same licence as `PyPDF4 <https://github.com/claird/PyPDF4/>`_ on which this lib depends).
Contributors Contributors
============ ============
@ -65,6 +65,10 @@ Contributors
Changelog 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 * Version 0.9 dated 2019-01-25
* Port to python 3 contributed by JoshuaJan (https://github.com/joshuajan) * Port to python 3 contributed by JoshuaJan (https://github.com/joshuajan)

View File

@ -33,10 +33,10 @@ from io import BytesIO
from lxml import etree from lxml import etree
from tempfile import NamedTemporaryFile from tempfile import NamedTemporaryFile
from datetime import datetime from datetime import datetime
from PyPDF2 import PdfFileWriter, PdfFileReader from PyPDF4 import PdfFileWriter, PdfFileReader
from PyPDF2.generic import DictionaryObject, DecodedStreamObject,\ from PyPDF4.generic import DictionaryObject, DecodedStreamObject,\
NameObject, createStringObject, ArrayObject NameObject, createStringObject, ArrayObject
from PyPDF2.utils import b_ from PyPDF4.utils import b_
from pkg_resources import resource_filename from pkg_resources import resource_filename
import os.path import os.path
import mimetypes import mimetypes
@ -287,7 +287,7 @@ def _prepare_pdf_metadata_xml(facturx_level, pdf_metadata):
desc_adobe.set(ns_rdf + 'about', '') desc_adobe.set(ns_rdf + 'about', '')
producer = etree.SubElement( producer = etree.SubElement(
desc_adobe, ns_pdf + 'Producer') desc_adobe, ns_pdf + 'Producer')
producer.text = 'PyPDF2' producer.text = 'PyPDF4'
desc_xmp = etree.SubElement( desc_xmp = etree.SubElement(
rdf, ns_rdf + 'Description', nsmap=nsmap_xmp) rdf, ns_rdf + 'Description', nsmap=nsmap_xmp)
desc_xmp.set(ns_rdf + 'about', '') desc_xmp.set(ns_rdf + 'about', '')

View File

@ -1,2 +1,2 @@
PyPDF2 PyPDF4
lxml lxml