When the TPrinter class was developed, dot-matrix printers and fan-fold paper 
were on their way out, and page oriented printing on ink-jet and laser printers 
was becoming the norm; so I don't think a lot of thought was put into giving 
the kind of control needed to do more specialized jobs like yours.

Raw printing may be a possibility, though more recent versions of Windows have 
made talking directly to the ports like that increasingly awkward and 
difficult. That can certainly improve throughput for dot-matrix printers by 
using the native resolution and fonts; though for one off labels performance at 
that level is probably not a big concern.

I'd say the easier route will be to treat a single label as a page, adjusting 
your page size accordingly (probably need a custom page size for this). That 
way, when you call .EndDoc you should only advance to the next label. 

Hopefully the distance between the last label on an actual page of labels and 
the first on a subsequent page is comparable to that between labels on a page 
(which was typical for old fan-fold labels, IIRC), otherwise you may have to 
manually adjust the printer after each page (PITA).

HTH

Stephen Posey
stephenlpo...@earthlink.net 

BTW, I prefer "Stephen" please.

-----Original Message-----
>From: K2RFP <rn...@verizon.net>
>Sent: Oct 3, 2012 10:32 AM
>To: Delphi-Talk Discussion List <delphi-talk@elists.org>
>Subject: Re: Printing Labels
>
>Steve:
>Writing a procedure to handle a batch of labels is
>not a problem but that is not what I want. As a ham
>radio operator I have, from time to time, to send
>a postcard to someone in my log book. So it is an
>individual label and the procedure is not called for
>every time I run the logbook program. So it doesn't
>make sense for the printer to do a form feed to a
>new page after printing one or two labels.
>
>I did some google searching and found out that
>EndDoc always results in a form feed and a way
>around it is to do a raw printing to the printer
>port. I haven't tried that. Another way I'll try
>is to set the physical size of the printer's page
>to the height of the label. You would think there
>would be an EndDoc2 procedure that does what EndDoc
>does but stops the printer in its tracks so I would
>not have to jump through hoops to do what I want.
>
>
>On 10/3/2012 9:55 AM, Stephen Posey wrote:
>> I'm not sure I understand the question here.
>>
>> Normally you don't call Printer.EndDoc until you're done printing. If you 
>> have multiple labels to print, then you'll want to handle them as a "batch" 
>> and compose them all onto your label page(s) before calling Printer.EndDoc.
>>
>> If the number of labels you have to print is more than will fit on a page of 
>> labels, then you'll call Printer.NewPage between page batches.
>>
>> If that doesn't clarify the situation then I'll need you to describe your 
>> setup and exactly what you're trying accomplish in more detail.
>>
>> Stephen Posey
>> stephenlpo...@earthlink.net
>>
>> -----Original Message-----
>>> From: -K2RFP- <rn...@verizon.net>
>>> Sent: Oct 2, 2012 1:25 PM
>>> To: Delphi-Talk Discussion List <delphi-talk@elists.org>
>>> Subject: Printing Labels
>>>
>>> I want to print individual 1-inch labels on fan-fold
>>> tractor feed paper. The label prints okay but the
>>> EndDoc statement causes thepaper to move to the next
>>> page. How do I get it tomove to the next label?
>>>
>>> The printer does not have any setting for labels.
>>>
>>>
>>>
>>> __________________________________________________
>>> Delphi-Talk mailing list -> Delphi-Talk@elists.org
>>> http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk
>> __________________________________________________
>> Delphi-Talk mailing list -> Delphi-Talk@elists.org
>> http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk
>>
>
>__________________________________________________
>Delphi-Talk mailing list -> Delphi-Talk@elists.org
>http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk

__________________________________________________
Delphi-Talk mailing list -> Delphi-Talk@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk

Reply via email to