Print to Printer.canvas with Filltext has no effect

Issue #101 resolved
Harry Stahl created an issue

The following code has no Output (you can test it with the attached project):

if PrintDialog1.Execute then begin
     Printer.BeginDoc;

      If PrintDialog1.PrintRange = TPrintRange.prAllPages Then begin
        For x := 1 To MaxPage do begin
          //Printer.canvas.beginscene;
          Printer.Canvas.FillText 
             (rect (100,100, 300, 150), 'Dies ist ein Test', false, 1, [], TTextAlign.Leading, 
              TTextAlign.Center);
          //Printer.canvas.endscene;
        end;
      End;

      { Drucken ausführen}
      Printer.EndDoc;
   end;

And more:

Printer.pagewidth (or Printer.pageheight) has value of zero, only when you call Printer.begindoc, the values are available

Comments (6)

  1. Harry Stahl reporter

    OK, it seems to be a problem also on Windows, since Delphi-Berlin.

    In Delphi Seattle or earlier, when we make the rect a Little more greater:

    rectF (100,100, 800, 450)

    the text is full visible.

    Since Delphi Berlin, all output has a height of a half of a millimeter...

  2. Log in to comment