DELPHI AREA
MESSAGE BOARD
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to print something using x,y in millemeters?

 
   Reply to topic    DELPHI AREA Forum Index -> Delphi Programming
View previous topic :: View next topic  
Author Message
Gil
Member


Joined: 24 Oct 2003
Posts: 4

PostPosted: 24/11/03 12:07    Post subject: How to print something using x,y in millemeters? Reply with quote

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
View user's profile
tomu
Member


Joined: 05 Jan 2004
Posts: 1

PostPosted: 05/01/04 15:59    Post subject: Reply with quote

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
View user's profile
Display posts from previous:   
   Reply to topic    DELPHI AREA Forum Index -> Delphi Programming All times are GMT
Page 1 of 1

 
Jump to:  
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