[luatex] pdf.getmatrix()
Andreas Matthias
andreas.matthias at gmail.com
Tue Apr 6 22:47:43 CEST 2021
I'm trying to understand how pdf.getmatrix() and pdf.hasmatrix() are
working. Let's take this example:
\pdfvariable compresslevel = 0
\nopagenumbers
\saveimageresource{test.pdf}
\useimageresource\lastsavedimageresourceindex
\latelua{
print()
print('>>>', pdf.hasmatrix())
local a, b, c, d, e, g = pdf.getmatrix()
print('>>>', a, b, c, d, e, g)
}
\bye
Here the created pdf stream looks like this:
q
1 0 0 1 72 556.89 cm
/Im1 Do
Q
I would have expected pdf.getmatrix() to return the last matrix being
used, which in this case is the one set by the cm-operator just before
inserting the image. But actually this is not how it's working.
So my questions are:
1) Which matrix is returned by pdf.getmatrix()?
2) Is it possible to get hold of the matrix used to insert the image
in the example above, i.e.: "1 0 0 1 72 556.89"
Andreas
More information about the luatex
mailing list.