🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Printing - Escape Sequence

#7310
From: Bob Gonder
Date: Wed, 16 Feb 2005 18:45
37 lines
1973 bytes

Thomas, please take a look at this again.
It is probably the way you need to do it.
Hans might not have made himself clear to you.

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

This is just off the top of my head, and is semi-psudo code, so look
at it and try to understand what Hans was trying to say.

PrintSomeLabels( int LabelsPerPage)
{
	int LabelNumber = 0;
	do{	PrintLabel( LabelNumber );
	}while( ++LabelNumber < LabelsPerPage );
	NewPage();	/* cut the paper  */
}
PrintLabel( int LabelNumber )
{	TextOut(  X ,  (LabelNumber*LabelHeight)+Y ,  ... );
}


An alternate method:
	int LabelNumber = 0;
	GetData();
	while( !DataEof )
	{	PrintLabel( LabelNumber );
		if( ++LabelNumber >= LabelsPerPage )
		{	NewPage();
			LabelNumber = 0;
		};
		GetData();
	};
Technical Details
Message-ID: <t347119u58jmpqed0n5qioicbvdkv3bub2@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!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>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,bfc9dd83e27dcf9d
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Printing - Escape Sequence 
Date: Wed, 16 Feb 2005 10:45:19 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <t347119u58jmpqed0n5qioicbvdkv3bub2@4ax.com>
References: <42125903@newsgroups.borland.com> <421348ec@newsgroups.borland.com> <42134c55@newsgroups.borland.com> <421357d5$1@newsgroups.borland.com> <42135870$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.69.90.200
X-Trace: newsgroups.borland.com 1108579518 69.69.90.200 (16 Feb 2005 10:45:18 -0800)
Lines: 42
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail