Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

alignment problem when printing text file

Hi,

I got a problem of alignment problem when printing a text file.
The text file was created by using @..say and set device to command, when
preview in Fixedsys and terminal fonts is OK but not for other fonts.

for example :-
@01,05 say 'x'
@02,01 say '12345'

the x won't be in line with 5.
[359 byte] By [bk] at [2007-11-10 12:48:58]
# 1 Re: alignment problem when printing text file
Ther's nothing wrong with the text file itself, but you MUST use a fixed
width font, not a proportional font, to view it if you want things to line
up.

You can use Courier New, Times Roman, but not Arial for instance.

--

Fred
Microsoft Visual FoxPro MVP
Please respond only to the newsgroups so that all may benefit.

bk wrote:
> Hi,
>
> I got a problem of alignment problem when printing a text file.
> The text file was created by using @..say and set device to command,
> when preview in Fixedsys and terminal fonts is OK but not for other
> fonts.
>
> for example :-
> @01,05 say 'x'
> @02,01 say '12345'
>
> the x won't be in line with 5.

--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003
Fred Taylor at 2007-11-11 23:51:27 >
# 2 Re: alignment problem when printing text file
Since when is Times Roman fixed width? <g>

Dan

"Fred Taylor" <ftaylor@mvps.org> wrote in message
news:3e7e5908$1@tnews.web.dev-archive.com...
> Ther's nothing wrong with the text file itself, but you MUST use a fixed
> width font, not a proportional font, to view it if you want things to line
> up.
>
> You can use Courier New, Times Roman, but not Arial for instance.
>
>
> --
>
> Fred
> Microsoft Visual FoxPro MVP
> Please respond only to the newsgroups so that all may benefit.
>
>
>
> bk wrote:
> > Hi,
> >
> > I got a problem of alignment problem when printing a text file.
> > The text file was created by using @..say and set device to command,
> > when preview in Fixedsys and terminal fonts is OK but not for other
> > fonts.
> >
> > for example :-
> > @01,05 say 'x'
> > @02,01 say '12345'
> >
> > the x won't be in line with 5.
>
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003
>
>
Dan Freeman at 2007-11-11 23:52:21 >
# 3 Re: alignment problem when printing text file
That's what I get for trusting my memory. ;)

--

Fred
Microsoft Visual FoxPro MVP
Please respond only to the newsgroups so that all may benefit.

Dan Freeman wrote:
> Since when is Times Roman fixed width? <g>
>
> Dan
>
> "Fred Taylor" <ftaylor@mvps.org> wrote in message
> news:3e7e5908$1@tnews.web.dev-archive.com...
>> Ther's nothing wrong with the text file itself, but you MUST use a
>> fixed width font, not a proportional font, to view it if you want
>> things to line up.
>>
>> You can use Courier New, Times Roman, but not Arial for instance.
>>
>>
>> --
>>
>> Fred
>> Microsoft Visual FoxPro MVP
>> Please respond only to the newsgroups so that all may benefit.
>>
>>
>>
>> bk wrote:
>>> Hi,
>>>
>>> I got a problem of alignment problem when printing a text file.
>>> The text file was created by using @..say and set device to command,
>>> when preview in Fixedsys and terminal fonts is OK but not for other
>>> fonts.
>>>
>>> for example :-
>>> @01,05 say 'x'
>>> @02,01 say '12345'
>>>
>>> the x won't be in line with 5.
>>
>>
>> --
>> Outgoing mail is certified Virus Free.
>> Checked by AVG anti-virus system (http://www.grisoft.com).
>> Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003

--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003
Fred Taylor at 2007-11-11 23:53:31 >
# 4 Re: alignment problem when printing text file
"Fred Taylor" <ftaylor@mvps.org> wrote in message
news:3e7fa57d@tnews.web.dev-archive.com...

> That's what I get for trusting my memory. ;)

Getting old enough to finally need that notebook, are you?

- Kris
Kristyne McDaniel at 2007-11-11 23:54:30 >
# 5 Re: alignment problem when printing text file
Kristyne McDaniel wrote:
> "Fred Taylor" <ftaylor@mvps.org> wrote in message
> news:3e7fa57d@tnews.web.dev-archive.com...
>
>> That's what I get for trusting my memory. ;)
>
> Getting old enough to finally need that notebook, are you?

Notebook? Then I'd only forget where I put the darn thing! <s>

--

Fred
Microsoft Visual FoxPro MVP
Please respond only to the newsgroups so that all may benefit.


--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003
Fred Taylor at 2007-11-11 23:55:23 >
# 6 Re: alignment problem when printing text file
I keep making mental notes to myself, but they keep getting lost.

Dan

"Fred Taylor" <ftaylor@mvps.org> wrote in message
news:3e7fdea8$1@tnews.web.dev-archive.com...
> Kristyne McDaniel wrote:
> > "Fred Taylor" <ftaylor@mvps.org> wrote in message
> > news:3e7fa57d@tnews.web.dev-archive.com...
> >
> >> That's what I get for trusting my memory. ;)
> >
> > Getting old enough to finally need that notebook, are you?
>
> Notebook? Then I'd only forget where I put the darn thing! <s>
>
Dan Freeman at 2007-11-11 23:56:30 >
# 7 Re: alignment problem when printing text file
Been there, done that. Still have the T-shirt. (somewhere)

--

Fred
Microsoft Visual FoxPro MVP
Please respond only to the newsgroups so that all may benefit.

Dan Freeman wrote:
> I keep making mental notes to myself, but they keep getting lost.
>
> Dan
>
> "Fred Taylor" <ftaylor@mvps.org> wrote in message
> news:3e7fdea8$1@tnews.web.dev-archive.com...
>> Kristyne McDaniel wrote:
>>> "Fred Taylor" <ftaylor@mvps.org> wrote in message
>>> news:3e7fa57d@tnews.web.dev-archive.com...
>>>
>>>> That's what I get for trusting my memory. ;)
>>>
>>> Getting old enough to finally need that notebook, are you?
>>
>> Notebook? Then I'd only forget where I put the darn thing! <s>

--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003
Fred Taylor at 2007-11-11 23:57:34 >
# 8 Re: alignment problem when printing text file
Patient: "Doctor, my arm hurts when I bend it like this."
Doctor: "Don't bend your arm like that and it will feel fine."

bk, have you considered not using @say and devices for outputting your text?

You could use the FlashParse freeware out there to generate your text file.
Or you could use the built-in TextMerge functionality from VFP 6/7/8. Or
you could take your output cursor, pad it with spaces/tabs so the columns
would be aligned, write it to an in-memory string, and StrToFile() the result
and print it with notepad or even into an "empty" report template. Or etcetcetc.
There are so many other modern ways to do things compared to @say.

I am not suggesting you make a change for change's sake. You get portability,
speed, and maintainability using any of the methods developed since @say
was used for output.

"bk" <bkyap@ams-m.com.my> wrote:
>
>Hi,
>
>I got a problem of alignment problem when printing a text file.
>The text file was created by using @..say and set device to command, when
>preview in Fixedsys and terminal fonts is OK but not for other fonts.
>
>for example :-
>@01,05 say 'x'
>@02,01 say '12345'
>
>the x won't be in line with 5.
stevec at 2007-11-11 23:58:31 >