🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Printing - Escape Sequence

#7301
From: Thomas J.
Date: Wed, 16 Feb 2005 14:43
95 lines
4402 bytes
The paperformat is 9cm to 7,5cm. The labels are "endless". On one role are
1000 labels.
The size of the paper (label) is set correct and I if I debug I get the
correct dimension of the labe in pixel.

One customer wants to have 2 lables together the next customers needs 4
label together. So each label represnets a page.

Unfortunately NewPage force the printer to create a new job. This I can see
on the display of the printer. But of course only one job you can see in
"windows printer job window". I'm sure that is a bug in the driver of the
printern and I will again the company why the hell NewPage force a new
job -> cutter will cut.

> A formfeed for TPrinter() is NewPage().

Thats what I think too. But then the escape sequence will also not the
solution and the answer form the printer support team is wrong.

> Forget about escape sequences. Use TextOut(X,Y, ...) to make new lines
> and use NewPage() as formfeed.

That would great if that will not force the cutter. The problem that in one
process you have to print 100 item each item with 2 or 3 label.
One solution is to destroy the cutter and cut by self - but 300 labels -
forget it.
The next solution will be that the stupid cutter cut EACH label and someone
has to tabe up each pair.

> Here you mixed the raw printer with TPrinter(). That seems a
> bad idea to me.

That bad idea is also not working ;)

"Hans Galema" <notused@notused.nl> schrieb im Newsbeitrag
news:421357d5$1@newsgroups.borland.com...
> Thomas J. wrote:
>
> > I want to print labels on a label printer.
>
> On what kind of paper ?
>
> > And the aim should be to print a
> > Label A and a Label B. After each second Label the cutter should cut.
>
> So not endless with labels glued on it ?
>
>  > I
> > assumes taht each label is a page. So I called NewPage().
>
> But then I would assume that every two labels constitute a page.
>
>  > But the printer
> > will create a new job for each call of NewPage
>
> No it will not make a new job. Just start on a new page.
>
>  > and for each new job the
> > cutter willl work. So Label A and Label B are not together anymore. (I
want
> > to print 300 labels).
> > The label printer company told me to send the esacep sequence F which is
> > 0x00c a form feed. And thats what I try to do for hours and hours.
>
> If you want to send an escape sequence than you have to use
> the printer in raw mode. As far as I know you cannot use TPrinter()
> for that. A formfeed for TPrinter() is NewPage().
>
> > I found out that another way it is possible to send escape sequnces.
>
> Forget about escape sequences. Use TextOut(X,Y, ...) to make new lines
> and use NewPage() as formfeed.
>
>
> >     OpenPrinter(printername, &PrnHandle, NULL);
> >     if (PrnHandle != NULL) {
>
> >        if (StartDocPrinter(PrnHandle,1,(LPSTR)&DocInfo) <= 0)
> >           Application->MessageBox("StartDocPrinter", "Error", MB_OK);
>
> >         printer->EndDoc();
>
>
> Here you mixed the raw printer with TPrinter(). That seems a
> bad idea to me.
>
>
> >     TPrinter* printer = Printer();
> >     printer->BeginDoc();
> >     printer->Canvas->TextOut(300, 300, "First page");
> >     Escape(printer->Canvas->Handle,
>
> You did not show what function Escape() does.
>
> Hans.
Technical Details
Message-ID: <42135c58@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.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>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,bfc9dd83e27dcf9d
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Thomas J." <monathomas@12move.de>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <42125903@newsgroups.borland.com> <421348ec@newsgroups.borland.com> <42134c55@newsgroups.borland.com> <421357d5$1@newsgroups.borland.com>
Subject: Re: Printing - Escape Sequence 
Date: Wed, 16 Feb 2005 15:43:55 +0100
Lines: 97
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 217.78.136.170
Message-ID: <42135c58@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1108565080 217.78.136.170 (16 Feb 2005 06:44:40 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail