It seem that printing with different printer result in some problem with the font. I was using a Canon Bj-200e and i didnt have the problem with the font but i change the printer for a HP DeskJet 920c and the font output is weird.
I use the font "ARIAL" but the output of the HP is printing some kind of fixed font (each caracter have the same length) so the text take more space.
Is this in my rpogram the problem or the HP dont support "ARIAL" font??
Here the code i use before BeginDoc
Printer.PrinterIndex := -1;
Printer.Title := 'BDM';
Printer.Orientation := poPortrait;
H1mm := GetDeviceCaps(Printer.Handle, LogPixelsX) / 25.4;
V1mm := GetDeviceCaps(Printer.Handle, LogPixelsY) / 25.4;
Printer.Canvas.Font.PixelsPerInch := GetDeviceCaps (Printer.Handle, LogPixelsX);
Brush.Color := clWhite;
Brush.Style := bsClear;
Font.Name := 'Arial';
Font.Size := 20;
Font.Style := [fsBold];
Font.Pitch := fpFixed;
TextOut(trunc(MidX - (TextWidth('XYZ') / 2)),
TopY + trunc(1 * V1mm),'XYZ');
If you can help me, i would appreciate it.