PDF Output: Fix a zero division error when the transformation matrix has a zero diagonal