Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-09

LazReport - Where the width of the designer page come from?

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Gabor Boros

Hi All,

LazReport's designer page with in pixels is strange for me.

LazReport - 752
FreeReport - 750
FastReport - 790
FPReport - 794

Width of A4 is 210mm. 210/25.4*96=793.7. Where the 752 come from?

Gabor

Reply by email

Jesus R.
to Graeme Geldenhuys

LazReport does not use the standard or known paper size, it uses the printer reported values.

For calculating the paper width it doesn't convert from mm, instead it uses the physical width of paper in dots at printer resolution then for the screen dimensions it scales down the value to a fixed resolution of 93 ppi and some account for aspect ratio which gives approximately 91 ppi, in other words LazReport scales the paper width to a fixed ppi, not to current screen ppi.

The calculations are as follow (for my selected printer of resolution of 600 dpi).

Paper width=4958 dots

screen paper width = 4958/600*93/1.022=751.94 ~ 752

FreeReport should report the same and I cannot explain the differences other than probably it doesn't use the reported printer values but some standard ones. I don't know how the original creator of freereport came out to a value for aspect ratio of 1.022 in the X direction, I would be glad to know for sure though.

2017-09-17 17:05 GMT-05:00 Graeme Geldenhuys via Lazarus :

Show quoted text 21 lines
On 2017-09-17 10:50, Gabor Boros via Lazarus wrote: > > Width of A4 is 210mm. 210/25.4*96=793.7. Yeah, fpReport is the only one with a sane value. :) Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -- _______________________________________________ Lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

Reply by email