{
/*
NOTE: Form-space-to-user-space matrix is identity [1 0 0 1 0 0] by default,
but may be adjusted by setting the Matrix entry in the form dictionary [PDF:1.6:4.9].
*/
PdfArray matrix = (PdfArray)File.resolve(
getBaseDataObject().getHeader().get(PdfName.Matrix)
);
if(matrix == null)
return new double[]
{
1, // a.
0, // b.
0, // c.
1, // d.
0, // e.
0 // f.
};
else
return new double[]
{
((PdfNumber<?>)matrix.get(0)).getNumberValue(), // a.
((PdfNumber<?>)matrix.get(1)).getNumberValue(), // b.
((PdfNumber<?>)matrix.get(2)).getNumberValue(), // c.
((PdfNumber<?>)matrix.get(3)).getNumberValue(), // d.
((PdfNumber<?>)matrix.get(4)).getNumberValue(), // e.
((PdfNumber<?>)matrix.get(5)).getNumberValue() // f.
};
}