For the Hdc print page layout SetLayout(pPrint.hDC, LAYOUT_RTL); that makes counting from right to left on page positions (of the print rects).
Note that you should use ExtTextOut() and in Rtl text alignment is always right, and in Ltr digits are right and text left SetTextAlign(pdPrint.hDC, TA_RIGHT | TA_TOP | TA_NOUPDATECP);.