• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Putting a Page Skip in a txt File?

W

W. eWatson

Flightless Bird
I'm sending text lines to a txt file and would like to skip to another
page at times. What sequence of characters do I need to do that? I tried
a simple chr(12), but that did nothing on either of two printers I tried.
 
V

VanguardLH

Flightless Bird
W. eWatson wrote:

> I'm sending text lines to a txt file and would like to skip to another
> page at times. What sequence of characters do I need to do that? I tried
> a simple chr(12), but that did nothing on either of two printers I tried.


There are no pagination boundaries in a *text* file. If you look at an
ASCII character chart, none of the control codes are for page breaks.
 
B

Bernd

Flightless Bird
-------- Original-Nachricht --------

> W. eWatson wrote:
>
>> I'm sending text lines to a txt file and would like to skip to another
>> page at times. What sequence of characters do I need to do that? I tried
>> a simple chr(12), but that did nothing on either of two printers I tried.

>
> There are no pagination boundaries in a *text* file. If you look at an
> ASCII character chart, none of the control codes are for page breaks.


What about FF = Form Feed = NP = New Page = x'0c'

http://www.december.com/html/spec/ascii.html

Bernd
 
W

W. eWatson

Flightless Bird
Bernd wrote:
>
>
> -------- Original-Nachricht --------
>
>> W. eWatson wrote:
>>
>>> I'm sending text lines to a txt file and would like to skip to
>>> another page at times. What sequence of characters do I need to do
>>> that? I tried a simple chr(12), but that did nothing on either of two
>>> printers I tried.

>>
>> There are no pagination boundaries in a *text* file. If you look at an
>> ASCII character chart, none of the control codes are for page breaks.

>
> What about FF = Form Feed = NP = New Page = x'0c'
>
> http://www.december.com/html/spec/ascii.html
>
> Bernd

I may have to give users of this file instructions to copy it into
WordPad, and then make everything fixed width format. WordPad does
accept the page advance. WP is probably acceptable, since it is widely
available in Win.
 
P

Pegasus [MVP]

Flightless Bird
"W. eWatson" <wolftracks@invalid.com> said this in news item
news:hiqtgi$kp$1@news.eternal-september.org...
> I'm sending text lines to a txt file and would like to skip to another
> page at times. What sequence of characters do I need to do that? I tried a
> simple chr(12), but that did nothing on either of two printers I tried.


chr(12) or $0c should theoretically work but only if your printer recognises
it. How did you enter $0c? Have you considered using Wordpad instead of
Notepad?
 
V

VanguardLH

Flightless Bird
Bernd wrote:

> -------- Original-Nachricht --------
>
>> W. eWatson wrote:
>>
>>> I'm sending text lines to a txt file and would like to skip to another
>>> page at times. What sequence of characters do I need to do that? I tried
>>> a simple chr(12), but that did nothing on either of two printers I tried.

>>
>> There are no pagination boundaries in a *text* file. If you look at an
>> ASCII character chart, none of the control codes are for page breaks.

>
> What about FF = Form Feed = NP = New Page = x'0c'
>
> http://www.december.com/html/spec/ascii.html


Forgot about that one (been a long time since I had to print in DOS any text
files). However, that has the FF control code sent to the device rather
than the app doing line counting (where the page size was defined by the
number of lines per page and even that could be off from the physical print
size depending on what system font size got used).

From what I've seen mentioned by other users trying to insert a chr$(12)
character in their .txt document when using Notepad is that Notepad shows
the control character but it has no effect during printing (might depend on
the printer, too). I don't have a printer at my current location to test
the effect of adding a FF character in a .txt file using Notepad assuming I
figure out how to insert the FF character into the document. Alt+12 doesn't
work as I get a warning dialog saying the Unicode formatted document will be
saved in ANSI format, and a hex editor shows 12 (0A) for the FF got replaced
with 63 (3F) which is "?" when I saved the .txt file.
 
W

W. eWatson

Flightless Bird
Pegasus [MVP] wrote:
> "W. eWatson" <wolftracks@invalid.com> said this in news item
> news:hiqtgi$kp$1@news.eternal-september.org...
>> I'm sending text lines to a txt file and would like to skip to another
>> page at times. What sequence of characters do I need to do that? I
>> tried a simple chr(12), but that did nothing on either of two printers
>> I tried.

>
> chr(12) or $0c should theoretically work but only if your printer
> recognises it. How did you enter $0c? Have you considered using Wordpad
> instead of Notepad?

See my last post. Yes, NP looks like a reasonable solution w/o spending
excessive amounts of time on this. Need a font that is fixed so lines
hold columns evenly across the page.
 
P

Pegasus [MVP]

Flightless Bird
"W. eWatson" <wolftracks@invalid.com> said this in news item
news:his16n$3au$1@news.eternal-september.org...
> Pegasus [MVP] wrote:
>> "W. eWatson" <wolftracks@invalid.com> said this in news item
>> news:hiqtgi$kp$1@news.eternal-september.org...
>>> I'm sending text lines to a txt file and would like to skip to another
>>> page at times. What sequence of characters do I need to do that? I tried
>>> a simple chr(12), but that did nothing on either of two printers I
>>> tried.

>>
>> chr(12) or $0c should theoretically work but only if your printer
>> recognises it. How did you enter $0c? Have you considered using Wordpad
>> instead of Notepad?

> See my last post. Yes, NP looks like a reasonable solution w/o spending
> excessive amounts of time on this. Need a font that is fixed so lines hold
> columns evenly across the page.


You could, of course, wrap the whole thing up in a VB Script file to count
lines and to insert the required number of blank lines when a page feed is
required. Without knowing more about your task it is impossible to say if
this approach is feasible.
 
Top