Pinting Table differs with Screen Resolution

General TRichView support forum. Please post your questions here
Post Reply
jhonalone
Posts: 31
Joined: Mon Apr 07, 2008 5:59 pm
Location: Madrid

Pinting Table differs with Screen Resolution

Post by jhonalone »

I have created a 8 fil by 3 col thaat fill a Din A-4 paper on a PC at 800x600 resolution pixels. I've a image and text on each cell.

When I print table, it perfectly fills a Din A-4 page. All Right.

But when I try to print on another PC with 1280x800 there are two problems:

1.- Width is well, but Height is small.

2.- Images are too smallst.

Code: Select all

for r := 0 to table.Rows.Count-1 do
    for c := 0 to table.Rows[r].Count-1
    do begin
       table.Cells[r,c].BestWidth := AnchCols;
       table.Cells[r,c].BestHeight := AltFilas;
       table.SetCellVisibleBorders(False, False, False, False,r,c);
       table.SetCellVAlign(rvcMiddle,r,c); ///(rvcTop,  rvcMiddle, rvcBottom)
       end;
I'm using 1.9.48 version.

There is a Solution for this?
Many Thanks
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

In TRichView versions prior to 13, sizes of objects like images are measured in "screen pixels". So, when printing, the size of images depends on the screen resolution, because it is calculated as
printing_width = original_width * printer_resolution / screen_resolution.
To make the results independent from the screen resolution, assign RichViewPixelsPerInch variable = 96.

PS: still, TRichViewEdit was not designed for WYSIWYG printing; it is implemented in ScaleRichView
jhonalone
Posts: 31
Joined: Mon Apr 07, 2008 5:59 pm
Location: Madrid

Post by jhonalone »

Sorry, I just posted a new post with more information.
But in the same PC, when change resolution, printing do not change.
jhonalone
Posts: 31
Joined: Mon Apr 07, 2008 5:59 pm
Location: Madrid

Post by jhonalone »

How can I change "RichViewPixelsPerInch variable = 96"? Please.
jhonalone
Posts: 31
Joined: Mon Apr 07, 2008 5:59 pm
Location: Madrid

Post by jhonalone »

Excuse me. I just found RichViewPixelsPerInch into Unit RVFuncs.
I'll try it now.
Best Regards Sergey, and thank you very much.
jhonalone
Posts: 31
Joined: Mon Apr 07, 2008 5:59 pm
Location: Madrid

Post by jhonalone »

Now all is OK.
Thanks.
Post Reply