BOOL32 __stdcall pdfGetMatrix(PPDF IPDF, TCTM* M);
function pdfGetMatrix(const IPDF: PPDF; var M: TCTM): LongBool; stdcall;
Purpose. Read the current accumulated transformation matrix.
Description. Returns the document's tracked FCTM (via GetCurrentMatrix) into M.a/b/c/d/x/y — the composition of every pdfSetMatrix/pdfRotateCoords/pdfScaleCoords/pdfSkewCoords/ pdfTranslateCoords call issued since the current page/template was opened (the CTM resets per page/template, not per document). Requires an open current page (D.HaveOpenPage) — unlike the setters below, which only require a current content stream (so they also work while editing a template). Calling pdfGetMatrix while only a template is open (no open page) fails even though the setters would have succeeded in that same context.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
M | Output: the current [a b c d x y] matrix. |
Return value. True if a page is currently open and M was filled; False otherwise (including while only a template — not a page — is open).
See also. pdfSetMatrix.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Getters
pdfGetMatrix
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.