Are PDF matrices required to be non-degenerate? #122
-
Does Arlington model require that all PDF matrices are non-degenerate (= invertible)? As far as I understand, this is not required (but strongly recommended) by ISO 32000-2. See NOTE 3 at the end of 8.3.4:
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
My idea of defining A lot of matrices are also defined only inside content streams so this wouldn't be a complete check until/unless content streams are also modelled and those matrices are also analyzed. Doing this requires software (not the model itself) to track the CTM and detect at any point if things go bad (I am assuming somewhere there is probably a place where potentially a valid PDF DOM matrix (or a bad rectangle) is multiplied by an invalid content stream CTM that would not be detectable from analysis of the PDF DOM alone). This will need to be part of the modelling of content streams in the future... Hopefully that answers your questions. |
Beta Was this translation helpful? Give feedback.
-
Clause 8.3.2.1 states "Transformations among coordinate spaces shall be defined by transformation matrices, which can specify any linear mapping of two-dimensional coordinates, including translation, scaling, rotation, reflection, and skewing." and 8.3.3 lists forms of matrices for translation, scaling, rotation and skewing while noting that these things can be combined into a single matrix. So I think from 8.3.2.1 we have a shall... So, vaguely recalling my uni maths but also deferring to you Prof Math 😀, I think that means that the determinant of Q (= [a b c d]) must equal 1; the transpose of Q is its inverse; the dot product of any Q row or Q column with itself equals one; the dot product of any Q row with any other Q row equals zero; etc. Over to you! |
Beta Was this translation helpful? Give feedback.
-
A degenerate matrix is perfectly normal any time you give anything zero size, and that's not uncommon in PDF (think annotations for invisible signatures). Scaling things to zero is OK - it might not produce any output, but it's mathematically sound. The fact you can't invert it only matters for computing the bounding box, but again - it's zero size, so can be discounted.
That sentence seems fairly implausible to me. It's trivial. A graphics system that doesn't cope with this wouldn't even pass basic testing. |
Beta Was this translation helpful? Give feedback.
-
There are only a handful of places where |
Beta Was this translation helpful? Give feedback.
-
BTW I don't intend to add anything further to the Arlington model about the |
Beta Was this translation helpful? Give feedback.
BTW I don't intend to add anything further to the Arlington model about the
matrix
type - I view this as an area implementers can extend if they wish.