🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7321

Re: Printing - Escape Sequence

#7321
From: Hans Galema
Date: Thu, 17 Feb 2005 13:20
51 lines
3068 bytes
Hans Galema wrote:
> Thomas J. wrote:
> 
>> You both are right, but my answer regarding the kind of label was 
>> "wrong". I
>> checked it in the evening the wording of the printer and the the label 
>> are
>> not endless in this context.
>> This means between each label is gap see "image" below or use the link.
> 
> 
> Yes that is exactly the kind of endless label paper that I had in mind.
> I use exactly the same. The only difference is that I do not cut the
> paper. The customer just takes the labels from the paper.
> 
>> And
>> the cutter has to cut exact between the gap. And the customers are using
>> different labels with different size of gap and therfor eI cannot your
>> solution.
> 
> 
> Of course you can use my solution. Everything holds.
> You should just print 1, 2, 3 or four labels. Position the text
> with TextOut. Now when you do a NewPage() and thereby force the
> printer to cut, then the customer has to have adjusted the printerdriver
> to the /length of paper/. It is the responsability of the customer
> to define the pagelength.
> 
> Hans.

What you should do is just execute (your) following code:

     TPrinter* printer = Printer();
     printer->BeginDoc();
     printer->Canvas->TextOut(300, 300, "First page");
     printer->NewPage();
     printer->Canvas->TextOut(300, 300, "Second page");
     printer->NewPage();
     printer->Canvas->TextOut(300, 300, "Third page");
     printer->EndDoc();

Now adjust the printerdriver -under windows itself- in
such a way that the page has such a length that there
will be cut after 1,2,3 or how many you like, labels.

Or just do a BeginDoc()/EndDoc() for every cut.

Once you have this ready then you can add the code for
printing the labels themself.

Hans.
Technical Details
Message-ID: <42149a5f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42125903@newsgroups.borland.com> <421348ec@newsgroups.borland.com> <42134c55@newsgroups.borland.com> <421357d5$1@newsgroups.borland.com> <42135870$1@newsgroups.borland.com> <t347119u58jmpqed0n5qioicbvdkv3bub2@4ax.com> <42148497@newsgroups.borland.com> <4214959e@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,bfc9dd83e27dcf9d
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 17 Feb 2005 14:20:06 +0100
From: Hans Galema <notused@notused.nl>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Printing - Escape Sequence 
References: <42125903@newsgroups.borland.com> <421348ec@newsgroups.borland.com> <42134c55@newsgroups.borland.com> <421357d5$1@newsgroups.borland.com> <42135870$1@newsgroups.borland.com> <t347119u58jmpqed0n5qioicbvdkv3bub2@4ax.com> <42148497@newsgroups.borland.com> <4214959e@newsgroups.borland.com>
In-Reply-To: <4214959e@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 129.125.201.248
Message-ID: <42149a5f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1108646495 129.125.201.248 (17 Feb 2005 05:21:35 -0800)
Lines: 53
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail