how to add PDF text run is diagonally downward direction

Q:
With the following piece of code i am able to add the text run in
diagonally upward direction.
i.e. the text run order is from lower left corner to upper right corner

mtx = Common::Matrix2D(1, 0, 0, 1, xval, new_yval); // Translate
angle = asin(page_height / diagonal);
mtx *= Common::Matrix2D::RotationMatrix( angle * (-1)); // Rotate text
element->SetTextMatrix(mtx);
writer.WriteElement(element);

I also want to add the text run in diagonally downward direction.
i.e. from text run order is from upper right corner to lower left
corner. But I am not able to do the same. Could you please guide me in
this matter?
If I apply the following piece of code, the text run order from upper
right corner to lower left corner, but the direction of the text is
reverse. I want to have the mirro image kind of effect of the text
displayed in the Red color.

mtx = Common::Matrix2D(-1, 0, 0, -1, xval, new_yval); // Translate
angle = asin(page_height / diagonal);
mtx *= Common::Matrix2D::RotationMatrix( angle * (-1)); // Rotate text
element->SetTextMatrix(mtx);
writer.WriteElement(element);
------------------------------
A:

You may want to rotate in the opposite direction, followed by vertical
translation by a page height.

mtx = Common::Matrix2D(1, 0, 0, 1, xval, new_yval); // minor
adjustments in transalation

mtx *= Common::Matrix2D:(1, 0, 0, 1, 0, page.GetMediaBox().Height());
// translate by a page height

angle = asin(page_height / diagonal);
mtx *= Common::Matrix2D::RotationMatrix( angle); // Rotate text in the
other direction