Tamaño de letras impresora tmu220d
Publicado por CARLOS EDGARDO (6 intervenciones) el 20/06/2020 22:40:06
Hola gente, estoy probando una impresora de tickets TMU220D M188D. Necesito poder cambiar el tipo y tamaño de las letras. Leí por allí el tema Comandos ESC/POS pero no se como aplicarlos en mi código. De la forma que estoy programando la impresión es directa y solo lo hace en un tipo de fuente y un solo tamaño. Como puedo cambiar esto. Saludos
Por más que modifique los valores de la variable LETRA sigue imprimiendo el mismo tipo y tamaño de fuente.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing.Printing;
namespace Impresora_de_prueba
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
printDocument1 = new PrintDocument();
PrinterSettings ps = new PrinterSettings();
printDocument1.PrinterSettings = ps;
printDocument1.PrintPage += Imprimir;
printDocument1.Print();
}
private void Imprimir(object sender, PrintPageEventArgs e)
{
Font letra = new Font("Times New Roman",20);
e.Graphics.DrawString("CONTROL BASCULA", letra, Brushes.Black, 5, 55);
}
}
}
Por más que modifique los valores de la variable LETRA sigue imprimiendo el mismo tipo y tamaño de fuente.
Valora esta pregunta
0