Home > Back-end >  About the Printers print problem!!
About the Printers print problem!!

Time:11-16

In a printer to print format, if the computer after the switch to a printer, or change the other printer, formatting is all messed up,
So I want to ask is there any way to no matter what kind of printer, always in a fixed place to print content

Printer. BeginDoc;

Printer. Canvas. The Font Style:=[fsBold];
Printer. Canvas. The Font Size:=22;
Printer. Canvas. TextOut (80, iCol + 20, '-- users online payment -');

Printer. Canvas. The Font Style:=[];
Printer. Canvas. The Font Size:=14;
Printer. Canvas. TextOut (30, iCol + 60, '-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --');

Printer. Canvas. The Font Style:=[fsBold];
Printer. Canvas. The Font Size:=22;
Printer. Canvas. TextOut (30, iCol + 80, jalist [iRow] [' addr] AsString) are identical.

Printer. Canvas. TextOut (30, iCol + 110, jalist [iRow] [' cust] AsString) are identical.
Printer. Canvas. TextOut (30, iCol + 130, jalist [iRow] [' phone '] AsString) are identical.
Printer. EndDoc;

CodePudding user response:

Different printer DPI is different, suggest using fastreport

CodePudding user response:

Print the cashier receipts? If it is print 58 mm, are similar

CodePudding user response:

Can design on a piece of paper, print format, generally will not disorderly,

CodePudding user response:

1/f, brother said to, DPI has different effect on different, so you want to use print control to help you solve this problem

1, use FastReport, Report to the machine can be, do a print format, save to file
2, the load before each print format file
3, to specify the component writes the corresponding value, then print
More tickets will repeat step 3

CodePudding user response:

Fewer and fewer people come here,

CodePudding user response:

refer to the second floor linghengmao response:
print cashier receipts? If print 58 mm, are almost


Yes, print receipts, only 58 and 80, and is now a row 2 version to deal with,
Ask you, how to print the picture on the cashier documents to deal with?
Printer. Canvas. StretchDraw is can't print it out

CodePudding user response:

reference 5 floor lyhoo163 reply:
here people less and less,

Thermal tickets show pictures on some farm printer should how to deal with,

CodePudding user response:

A picture, and think how to draw how to draw, print out is not the problem of printer, directly onto the BMP look have you

CodePudding user response:

May be you need into the BMP bitmap format to print it out,

CodePudding user response:

refer to 6th floor q18874197270 response:
Quote: refer to the second floor linghengmao response:

Print the cashier receipts? If print 58 mm, are almost


Yes, print receipts, only 58 and 80, and is now a row 2 version to deal with,
Ask you, how to print the picture on the cashier documents to deal with?
Printer. Canvas. StretchDraw is to print out


This problem is a classic problem of Windows programming, from see someone asked when I was in high school, saw more than 30 times, all seem to answer 5 + times myself, there are still people ask ~ ~ ~
The answer is: a word with StretchDIBits
To explain why, that is, certain types of DC (DC) typical such as printer may not support BitBlt, StretchBlt this operation (StretchDIBits in reality may not support this kind of printer printer should be text, does not support print graphics), you should use GetDeviceCaps check the DC raster operation support capacity
  • Related