Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Label Printing

Posted on 2001-08-30
11
Medium Priority
?
394 Views
Last Modified: 2010-04-06
Anyone has experience in doing label printing? Can you kindly guide me how to do such printing? What method? Using Quick Report?? or other text format?
0
Comment
Question by:ivylnm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 3

Expert Comment

by:MarcG
ID: 6439956
You can use normal TPrinter.
With Printer.StartDoc you can start the Printing and then Paint on the printers canvas. With Printer.EndDoc you finish printing, that means now the document is ready and sent to the printer.

To get the right dimensions you have to get the printer resolution that is set and adjust your painting on the printer.canvas to the resolution (with resolution 600dpi you would need a rectangle that is two times bigger than with a 300 dpi resolution ...)
0
 
LVL 6

Expert Comment

by:wimmeyvaert
ID: 6439987
Is the data in a DataBase ?
If so, then I would suggest to use QuickReports.

Is the printer parrallel or serail ?
If serial, then it is better to put your labeldata in i.e.
a TMemo or TRichEdit, and then Dump the contents to the COM-Port.

Best regards,
The Mayor.
0
 
LVL 9

Expert Comment

by:ITugay
ID: 6440015
Hi ivylnm,

I recommend you to use QuickReport. There is no problems if your data in database or not. QR is easy tool to create labels layout, and it's easy to fill data in runtime.

-----
Igor.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 6

Expert Comment

by:wimmeyvaert
ID: 6440029
ITugay is right, but I think using QuickReports is not recommended if you have to send the data to a serial printer (most label-printers are NOT parrallel).

You then have to dump the data to the COM-Port in a specific format (with sepcial charachter). This data is then a String of characters. Thats why i think it is then better to use a Tmemo to dump the data.
0
 
LVL 4

Expert Comment

by:jsweby
ID: 6440229
We use the excellent (and highly-rated) ReportBuilder from Digital Metaphors (www.digital-metaphors.com) which has inbuilt support for label printing, they have included a large range of the standard Avery labels for example in their Labels Wizard.

J.
0
 
LVL 3

Expert Comment

by:VSF
ID: 6440230
Take a look at this question:

Mailing Labels
http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=20168180

Hope this helps!
VSF
www.victory.hpg.com.br
0
 

Author Comment

by:ivylnm
ID: 6446990
The Mayor,

  I am interested in what you mentioned about Com Port thing.  May I know where I can find more details on that?  As I do realize that label printer is not working parallel.

Thanks,
Ivy
0
 
LVL 6

Expert Comment

by:wimmeyvaert
ID: 6449884
Hi Ivy,

We use Intermec labelprinters, Model 4400.
In the manuals you can find info on how to print labels to the printer.

There are 2 things to know :

1) First you have to define a label-format. You can build this format in a simple texteditor (notepad). Each format has an identity (number : E1 .. E18), and has also fields defined in it.
Example of one of our formats :
<STX><ESC>P<ETX>
<STX>E1;F1;<ETX>
<STX>L39;D0;<ETX>
<STX>D39;<ETX>
<STX>H1,TType    ;o310,130;f3;r0;c33;h1;w1;b0;d0,20;<ETX>
<STX>H2,TArtCode ;o270,130;f3;r0;c33;h1;w1;b0;d0,20;<ETX>
<STX>H3,TBatch   ;o230,130;f3;r0;c33;h1;w1;b0;d0,20;<ETX>
<STX>H4,TSpuiter ;o190,130;f3;r0;c33;h1;w1;b0;d0,20;<ETX>
<STX>H5,TKlever  ;o150,130;f3;r0;c33;h1;w1;b0;d0,20;<ETX>
<STX>H6,TDatum   ;o110,130;f3;r0;c33;h1;w1;b0;d0,20;<ETX>
<STX>H7,TUur     ;o070,130;f3;r0;c33;h1;w1;b0;d0,20;<ETX>
<STX>H8,TControle;o030,130;f3;r0;c33;h1;w1;b0;d0,20;<ETX>
<STX>H9,DType    ;o310,300;f3;r0;c33;h1;w1;b0;d0,40;<ETX>
<STX>H10,DArtcode;o270,300;f3;r0;c33;h1;w1;b0;d0,40;<ETX>
<STX>H11,DBatch  ;o230,300;f3;r0;c33;h1;w1;b0;d0,40;<ETX>
<STX>H12,DSpuiter;o190,300;f3;r0;c33;h1;w1;b0;d0,40;<ETX>
<STX>H13,DKlever ;o150,300;f3;r0;c33;h1;w1;b0;d0,40;<ETX>
<STX>H14,DDatum  ;o110,300;f3;r0;c33;h1;w1;b0;d0,40;<ETX>
<STX>H15,DUur    ;o070,300;f3;r0;c33;h1;w1;b0;d0,40;<ETX>
<STX>R;<ETX>
(With <STX> = Start of TeXt, and <ETX> = End of TeXt).

To donwload the format to the printer (on COM1) :
I use the FileCopy-Funtion of Delphi :
  CopyFile(PChar('Format.Txt') , PChar('COM1') , False);


Now making labels is pretty much the same. I put all the data in a textfile and then use the same FileCopy-Function to dump this datafile to the printer.
Example of a datafile (= data of 1 label) :
The first line is needed in order to let the printer know which format it must use. The other lines are just data, that must appear on the label (Type, Code Art, ...)
Each line MUST begin with <STX> and ends with <ETX>

<STX><ESC>E1<ETX>
<STX><CAN><ETX>
<STX>Type     :<CR><ETX>
<STX>Code Art :<CR><ETX>
<STX>Nr Batch :<CR><ETX>
<STX>Encoll.  :<CR><ETX>
<STX>Elabor.  :<CR><ETX>
<STX>Date     :<CR><ETX>
<STX>L'heure  :<CR><ETX>
<STX>Controle :<CR><ETX>
<STX>Arriere Gauche K  -  Acier<CR><ETX>
<STX>A3042908<CR><ETX>
<STX>31.15.79.81<CR><ETX>
<STX>Hilde Verhoeven<CR><ETX>
<STX>e de keyser ann<CR><ETX>
<STX>ma 03/09/2001<CR><ETX>
<STX>08:45:47<CR><ETX>
<STX><ETB><ETX>


I hope i have give you enough information to start your reseacrh.

Best regards,
The Mayor.

P.S. : The main thing is that you create a textfile and dump it to the com-port with FileCopy.
The contents of the file is linked to the brand of printer you are using. this info should be available in the manuals.





0
 

Author Comment

by:ivylnm
ID: 6452055
So what do you mean is it still depends on what kind of label printer that you are using ya.  
0
 
LVL 6

Accepted Solution

by:
wimmeyvaert earned 600 total points
ID: 6452269
As far as I know, it depends on the brand of printer you are using.
But I think that you always have to download The labelformat to the printer, before you can print any label
at all.
After all the printer should know where to put the data on the label.

Maybe I explain a bit more what's in a datafield-definition:
<STX>H3,TBatch   ;o230,130;f3;r0;c33;h1;w1;b0;d0,20;<ETX>
Where:
<STX>    = Start of TeXt
H3       = Third Human readable field  
TBatch   = FieldName (must be unique in the format)
o230,130 = origin (X,Y)
f3       = Field Direction (3 = 270? rotated)
r0       = Character rotation (0 = Horizontal)
c33      = Font number
h1       = FontHeight (1)
w2       = FontWidth (2)
b0       = Border around text (0 = None)
d0,20    = Field Data, Define Source
<ETX>    = End of TeXt.

The way of downloading (format + labeldata) is always the same : Just use the CopyFile-Function as I decribed in my previous comment.

Do you know which printerbrand(s) you are using ?
Maybe ther could be find something on the net/manuals.

Best regards,
The Mayor.
0
 

Author Comment

by:ivylnm
ID: 6452502
Oh thanks for your detailed description.  Now I realize that there is so much different in label printing.  Actually I have not had any idea that what kind of label printer that I will be using.  But I need to pick up the method to do the printing now.  So from your information and explaination, I can see that label printing will use another kind of printer and every kind of label printer will have its own format.  At first, I thought I will be using normal printer to print the labels.  Maybe if I find out what kind of label printer I will be using later on.  Thanks a lot.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question