Re: FreePascal.Ru: a way to determine printer aspect ratio
Martin Schreiber <nospam@...
2008-05-03 12:07:58 GMT
> For non-square dot-matrices, Delphi/Lazarus:
> i := Image1.Canvas.TextWidth('sample');
> i1 := Image1.Canvas.TextHeight('sample');
> j := Printer.Canvas.TextWidth('sample');
> j2 := Printer.Canvas.TextHeight('sample');
> kofX := j / i;
> kofY := j2 / i1;
> Is it relevant ?
That would apply for tgdiprinter only? I have no printer with different DPI
in X and Y direction, I can't test. I disbelieve that Microsoft provides
sufficient documentation, you must try the win32 API your self
(GetDeviceCaps?). For example I didn't find any documentation how to setup
win32 taskbar window buttons correctly, I found the solution by accident...