Correct origin for graphics object?

Hello,

a client complains about my DrawRotatedTextMBS function not drawing at the right spot.

Is there a way to know for a graphics from printer how much offset to use?
Xojo seems to know it as it draws there.

And for some printers the offsets are zero as it’s okay there.

Seems like the paper may have an offset which is not used for the CGContext object we get from graphics.

REALGetGraphicsOrigin seems not to help as it’s always 0/0.

If Printing then x = x - PageSetup.PageLeft y = y + PageSetup.PageTop End If

in the Xojo code doesn’t solve it perfectly.

Is there a StringShape involved? If so, then there is a known issue with position of StringShapes (only when printing): <https://xojo.com/issue/49634>

[quote]If Printing then
x = x - PageSetup.PageLeft
y = y + PageSetup.PageTop
End If[/quote]

Your code is correct, and AFAIK it works OK on Mac.

However, if you’re using Xojo 2017 or later, there are also problems with the unprintable area not being available via the Page
Setup on Microsoft Windows, which is critical for correctly positioning text (including the RotatedTextMBS). Instead, you get whatever the user sets in the Page Setup dialog window (typically 1" from the paper edge). I don’t know of a workaround, so I’m stuck with 2016r3.

Hopefully Xojo can get this fixed sooner rather than later.