|
|
@ -206,7 +206,7 @@ def convert(images, dpi, x, y, title=None, author=None, creator=None, producer=N
|
|
|
|
|
|
|
|
|
|
|
|
for imfilename in images:
|
|
|
|
for imfilename in images:
|
|
|
|
debug_out("Reading %s"%imfilename, verbose)
|
|
|
|
debug_out("Reading %s"%imfilename, verbose)
|
|
|
|
im = open(imfilename, "rb")
|
|
|
|
with open(imfilename, "rb") as im:
|
|
|
|
rawdata = im.read()
|
|
|
|
rawdata = im.read()
|
|
|
|
im.seek(0)
|
|
|
|
im.seek(0)
|
|
|
|
try:
|
|
|
|
try:
|
|
|
@ -286,8 +286,6 @@ def convert(images, dpi, x, y, title=None, author=None, creator=None, producer=N
|
|
|
|
|
|
|
|
|
|
|
|
pdf.addimage(color, width, height, imgformat, imgdata, pdf_x, pdf_y)
|
|
|
|
pdf.addimage(color, width, height, imgformat, imgdata, pdf_x, pdf_y)
|
|
|
|
|
|
|
|
|
|
|
|
im.close()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return pdf.tostring()
|
|
|
|
return pdf.tostring()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|