Merged from upstream git d9abcaf566e9cd7f702c98958f99f90fd53b4c0b Amongst others, this fixes the printing issue under Dia when using some classes.