As an update to this in case it helps anybody, it seems that this is
to do with the code that sets image height and width. In pisa_tags.py
line 295:
if (width is None) and (height is not None):
factor = float(height) / img.drawHeight
img.drawWidth *= factor
img.drawHeight = height
elif (height is None) and (width is not None):
factor = float(width) / img.drawWidth
img.drawHeight *= factor
img.drawWidth = width
elif (width is not None) and (height is not None):
img.drawWidth = width
img.drawHeight = height
It seems that this does not like the height set (because it has 'px'
on the end). Fixing that however leads to further type errors. If I
delete the whole of the above code then I get a PDF I am happy with
(although presumably the heights and widths are incorrectly set).