commit ccdf254be69763d405291cf317c1ef2b5e4e2c3c Author: Dave Pedu Date: Thu Jun 2 19:58:03 2016 -0700 initial commit diff --git a/pdffile.py b/pdffile.py new file mode 100755 index 0000000..41dbb71 --- /dev/null +++ b/pdffile.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python +from PyPDF2 import PdfFileWriter, PdfFileReader +from reportlab.pdfgen import canvas +from StringIO import StringIO + +# width 595 units +# height 841 units + +def pdffile(imagelist, outputfilename, originalFileName, infoFile): + positions=[ + [5,330], + [300, 330], + [5,5], + [300,5] + ] + + # number of QR codes + totalPieces = len(imagelist) + currentPiece=1 + + # PDF document is created here + pdf = PdfFileWriter() + + while len(imagelist)>0: + # Get the first 4 images from the array + tmpImageList = [] + while len(tmpImageList)