summarylogtreecommitdiffstats
path: root/python-signpdf.patch
diff options
context:
space:
mode:
Diffstat (limited to 'python-signpdf.patch')
-rw-r--r--python-signpdf.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/python-signpdf.patch b/python-signpdf.patch
new file mode 100644
index 000000000000..8fe1bee0eb21
--- /dev/null
+++ b/python-signpdf.patch
@@ -0,0 +1,21 @@
+diff -ura signpdf-0.0.3.orig/signpdf.py signpdf-0.0.3.new/signpdf.py
+--- signpdf-0.0.3.orig/signpdf.py 2015-04-25 19:13:15.000000000 +0100
++++ signpdf-0.0.3.new/signpdf.py 2018-11-01 19:11:00.941260261 +0000
+@@ -44,7 +44,7 @@
+ # Create PDF for signature
+ sig_tmp_filename = _get_tmp_filename()
+ c = canvas.Canvas(sig_tmp_filename, pagesize=page.cropBox)
+- c.drawImage(args.signature, x1, y1, width, height)
++ c.drawImage(args.signature, x1, y1, width, height, mask='auto')
+ if args.date:
+ c.drawString(x1 + width, y1, datetime.datetime.now().strftime("%Y-%m-%d"))
+ c.showPage()
+@@ -59,7 +59,7 @@
+
+ writer.addPage(page)
+
+- with open(output_filename, 'w') as fh:
++ with open(output_filename, 'wb') as fh:
+ writer.write(fh)
+
+ for handle in [pdf_fh, sig_tmp_fh]: