el-mono
01-07-2017, 05:05:11
Buenas a todos, necesito imprimir texto sobre impresora en Windows utilizando Firemonkey. Utilizo Delphi 10.1 Berlin.
Con el siguiente código logre imprimir, pero el texto sale muy pequeño y no logro manipularlo para agrandar el texto.
var
MyRect: TRectF;
begin
// Image1.Bitmap.Clear($FFFFFF);
// sets the rectangle where the text will be displayed
MyRect := TRectF.Create(0, 0, 400, 570);
// fills and draws the text in the specified rectangle area of the canvas
Printer.BeginDoc;
Printer.Canvas.Font.Style := [];
Printer.Canvas.Font.Size := 12;
Printer.Canvas.FillText(MyRect, 'Texto a Imprimir', false, 1,[], TTextAlign.Center, TTextAlign.Center);
Printer.EndDoc;
Con el siguiente código logre imprimir, pero el texto sale muy pequeño y no logro manipularlo para agrandar el texto.
var
MyRect: TRectF;
begin
// Image1.Bitmap.Clear($FFFFFF);
// sets the rectangle where the text will be displayed
MyRect := TRectF.Create(0, 0, 400, 570);
// fills and draws the text in the specified rectangle area of the canvas
Printer.BeginDoc;
Printer.Canvas.Font.Style := [];
Printer.Canvas.Font.Size := 12;
Printer.Canvas.FillText(MyRect, 'Texto a Imprimir', false, 1,[], TTextAlign.Center, TTextAlign.Center);
Printer.EndDoc;