Print Preview Text Size
Posted: Thu Sep 23, 2021 10:08 am
Hi Sergey,
In my main rve I am now using DocumentPixelsPerInch and no longer setting overall font size(s) as a "zoom." I would like to maintain the approximate overall text size or "zoom" when printing. I've tried the following ("memo" is my rve, rvs is its RVStyle):
Of those, only rvs.TextStyles[0].Size changes the print preview text. Is there a way to do this to make the printout text size or dpi consistent with my main rveDocumentPixelsPerInch setting?
I set this up this way for now. I added 2 buttons to my print preview form, one to make the font larger, one smaller.
This actually works OK, although I can't quite get the preview to redraw accurately but the printout is OK so that's not a showstopper. But, as always, if you have a better way I'd love to know!
Thanks Sergey.
Stan
In my main rve I am now using DocumentPixelsPerInch and no longer setting overall font size(s) as a "zoom." I would like to maintain the approximate overall text size or "zoom" when printing. I've tried the following ("memo" is my rve, rvs is its RVStyle):
Code: Select all
memo.DocumentPixelsPerInch := rve.DocumentPixelsPerInch;
rvs.UnitsPixelsPerInch := rve.DocumentPixelsPerInch;
rvs.TextStyles[0].Size := 48;
I set this up this way for now. I added 2 buttons to my print preview form, one to make the font larger, one smaller.
Code: Select all
procedure TFormPrintPreview.SRDCvsFontLargerMouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
i, i2: integer;
begin
if Button = mbRight then exit;
for i := 0 to RVPrint1.rv.Style.TextStyles.Count-1 do
RVPrint1.rv.Style.TextStyles[i].Size := RVPrint1.rv.Style.TextStyles[i].Size + 2;
for i := 0 to RVPrint1.rv.Style.ListStyles.Count - 1 do
begin
for i2 := 0 to RVPrint1.rv.Style.ListStyles[i].Levels.Count-1 do
RVPrint1.rv.Style.ListStyles[i].Levels[i2].Font.Size :=
RVPrint1.rv.Style.ListStyles[i].Levels[i2].Font.Size + 2;
end;
RVPrint1.FormatPages( rvdoALL );
RVPrintPreview1.Repaint ;
end;
Thanks Sergey.
Stan