[quote=136750:@Tim Turner]Do you scale the top and bottom margins by the vertical resolution?
And then scale left and right margins by the horizontal resolution?
[/quote]
No. The margins as reported by PrinterSetup are already in terms of the resolution.
[quote]Since printer gets the max resolution for vertical and horizontal… are those every DIFFERENT?
[/quote]
They are usually the same, but they can be different. Code defensively.
It does internal scaling of font size. You set resolution when you create the report.
Problem is on a mac the text prints blurry like its 72dpi even if I scale it by printer resolution.
If I set the report resolution to 144 dpi it prints the text not as blurry but also too big for the page and
it goes off the page and is a big font size.
The same code on windows works fine so I am baffled.
Anyway in a real bind here… can’t figure this one out.
if p.PageSetupDialog Then
MsgBox “Horiz resolution=” + Str(p.HorizontalResolution) + EndOfLine + EndOfLine + “SetupString=” + p.SetupString
End if[/code]
If you look before and after you will see the resolution is updated. Also you can save and reuse the SetupString to retain settings going forward.
OK I understand… but why would an if statement keep popping the dialog up over and over.
if ps.PageSetupDialog Then
MsgBox “Horiz resolution=” + Str(ps.HorizontalResolution) + EndOfLine '+ EndOfLine + “SetupString=” + ps.SetupString
app.PrinterSettings = ps.SetupString
End if
When i run my app and print and it gets to this code… I can click cancel or print and it just keeps popping up the dialog over and over again. I have to force quit to get out of it.