1
0
Fork 0
forked from josch/img2pdf

output pdf image size with four significant digits

This commit is contained in:
josch 2015-03-06 19:16:36 +01:00
parent 8f757bc3bb
commit 2cb8e55f1d

View file

@ -163,7 +163,7 @@ class pdfdoc(object):
# Inverts all four channels
image.content['/Decode'] = [1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0]
text = ("q\n%f 0 0 %f 0 0 cm\n/Im0 Do\nQ"%(pdf_x, pdf_y)).encode('utf8')
text = ("q\n%0.4f 0 0 %0.4f 0 0 cm\n/Im0 Do\nQ"%(pdf_x, pdf_y)).encode('utf8')
content = obj({
"/Length": len(text)