 |
MESSAGE BOARD
|
| View previous topic :: View next topic |
| Author |
Message |
Gil Member
Joined: 24 Oct 2003 Posts: 4
|
Posted: 24/11/03 12:07 Post subject: How to print something using x,y in millemeters? |
|
|
I'm printing bar codes, but under each bar code I need to print a label...
the barcode can be printed using x,y in millimeter... but the label i can not... How can I do it ??? What is the value of 1millimeter in pixels ??
My code:
| Code: |
with Printer do
begin
BeginDoc;
DBBarcode1.Print(utMillimeter, posX, posY, 15, 0.2, 0);
Canvas.Font.Name := 'Arial';
Canvas.Font.Size := 8;
Canvas.Font.Style := [fsBold];
Canvas.TextOut(labelX, labelY, 'Perda de Garantia Se Removido');
EndDoc;
end;
|
|
|
| Back to top |
|
 |
tomu Member
Joined: 05 Jan 2004 Posts: 1
|
Posted: 05/01/04 15:59 Post subject: |
|
|
You may need to use the Windos API instead of Delphi's Canvas.
Use the Canvas.Handle with API calls like SetMapMode(Canvas.Handle ,MM_HIMETRIC) and
TextOut(Canvas.Handle,2,2,'123',3); to print '123' 2 mm down and over. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB 2.0.6 © 2001, 2002 phpBB Group
|