StyledTextPrinter scale

I am trying to scale the ouput of StyledTextPrinter.DrawBlock() but no matter the setting of MaxHorizontalResolution and MaxVerticalResolution I get always the very same result.

Any assistance will be greatly appreciated.


what values are you setting them to?
They MUST be equal to a value supported by your printer or they default back to 72 (or for some drivers they round down to the next lowest supported resolution). This affects only QUALITY of print, not the size.

setting to 300 doesn’t make the text 4x bigger, just 4x “better”

Windows or OSX? On OS X it should make any difference.

This is on Windows for the moment. But Sam, you say in OS X it it makes no difference either ?

I experimented quite a bit more. It appears that StyledTextPrinter DrawBlock simply does not work at all like other usual printing ways such as drawstring and graphics such as DrawPicture or DrawRect.

With regular graphic commands, setting the max resolution allows setting the scale of the picture relative to 72 dpi.

With DrawBlock, nothing. No matter the max resolution, the output remains desperately the same.

I am going to use a secondary TextArea and scale the TextRuns before printing. That way I will be able to zoom in and out at will.

Actually, it makes it 4x smaller. Unless you increase the font size by 4x.