Hi friends need solution

sk_manu

New Member
Hi all,

how to stop printer from scolling in to next page ?. I.e. if some message contains 10 line after printing 10 lines, printer has to stop there. for next print, it has to start print from 11th line of the same old sheet, it should not take new sheet .:confused:

Thanks & Regards,

Manohar
 
It depends on how your printer is set up etc.

Normally, you would do someting like this:

output to c:\myfile.txt.
/* do your printing */
output close.

Then you would print the file myfile.txt.

As long as you don't use PAGED in the OUTPUT statement, you shouldn't produce a page character chr(12) (^L). You can check it in EDIT to see there are no ankh characters). Then you can send it to the printer.

However, some printers may handle the file and try to be clever. Our laser printers are set up so that if they receive a file with no page break at the end, they wait for 30 seconds and then output the whole page anyway.

Any printer using continuous paper should be OK as they normally print a bit then wait for the next bit to print out.

Are you outputting direct to the printer (OUTPUT TO PRINTER) or using PAGED or PAGE-SIZE in the OUTPUT command? What kind of printer are you using?

Hope this helps.

Simon
 
it@flude.co.uk said:
It depends on how your printer is set up etc.

Normally, you would do someting like this:

output to c:\myfile.txt.
/* do your printing */
output close.

Then you would print the file myfile.txt.

As long as you don't use PAGED in the OUTPUT statement, you shouldn't produce a page character chr(12) (^L). You can check it in EDIT to see there are no ankh characters). Then you can send it to the printer.

However, some printers may handle the file and try to be clever. Our laser printers are set up so that if they receive a file with no page break at the end, they wait for 30 seconds and then output the whole page anyway.

Any printer using continuous paper should be OK as they normally print a bit then wait for the next bit to print out.

Are you outputting direct to the printer (OUTPUT TO PRINTER) or using PAGED or PAGE-SIZE in the OUTPUT command? What kind of printer are you using?

Hope this helps.

Simon

Hi Simon,

Thank u for u r response. Im outputting direct to printer using PAGE-SIZE option, i gave page-size as 10, and printed only one line, then also after printing it moves to second page. Im using dot matrix printer.

Manohar
 
That's probably where your problem is, at a guess. If you use PAGE-SIZE then progress assumes you are using paging, so it puts a Form Feed (FF)character chr(12) at the end of your document. When you print it out, you will get a page thrown out of the printer.

Normally, you get the FF when you close the output, as Progress assumes that this is the end of the page.

OUTPUT TO PRINTER PAGE-SIZE 10.
PUT UNFORMATTED "HELLO - LINE 1" SKIP.
PUT UNFORMATTED "HELLO - LINE 2" SKIP.
PUT UNFORMATTED "HELLO - LINE 3" SKIP.
PUT UNFORMATTED "HELLO - LINE 4" SKIP.
OUTPUT CLOSE.

This should give you 4 lines then a FF.

I am guessing you have something like:

OUTPUT TO PRINTER PAGE-SIZE 10.
/*Do something */
OUTPUT CLOSE.
OUTPUT TO PRINTER PAGE-SIZE 10.
/* Do something else */
OUTPUT CLOSE.

This would throw 2 pages out, one with something on and the other with something else on.

If you want to keep the structure, then take out the PAGE-SIZE entirely. This will allow you to print a few lines, then wait a bit, then print some more. If you do want to throw out a page, then use PUT UNFORMATTED CHR(12) which has the same effect.

You would need to keep track of your line counts yourself, as you can't use Progress's page-handling commands if you don't use PAGED or PAGE-SIZE.

Hopefully, that should help. If not, post the code and we'll have a look.

Simon
 
it@flude.co.uk said:
That's probably where your problem is, at a guess. If you use PAGE-SIZE then progress assumes you are using paging, so it puts a Form Feed (FF)character chr(12) at the end of your document. When you print it out, you will get a page thrown out of the printer.

Normally, you get the FF when you close the output, as Progress assumes that this is the end of the page.

OUTPUT TO PRINTER PAGE-SIZE 10.
PUT UNFORMATTED "HELLO - LINE 1" SKIP.
PUT UNFORMATTED "HELLO - LINE 2" SKIP.
PUT UNFORMATTED "HELLO - LINE 3" SKIP.
PUT UNFORMATTED "HELLO - LINE 4" SKIP.
OUTPUT CLOSE.

This should give you 4 lines then a FF.

I am guessing you have something like:

OUTPUT TO PRINTER PAGE-SIZE 10.
/*Do something */
OUTPUT CLOSE.
OUTPUT TO PRINTER PAGE-SIZE 10.
/* Do something else */
OUTPUT CLOSE.

This would throw 2 pages out, one with something on and the other with something else on.

If you want to keep the structure, then take out the PAGE-SIZE entirely. This will allow you to print a few lines, then wait a bit, then print some more. If you do want to throw out a page, then use PUT UNFORMATTED CHR(12) which has the same effect.

You would need to keep track of your line counts yourself, as you can't use Progress's page-handling commands if you don't use PAGED or PAGE-SIZE.

Hopefully, that should help. If not, post the code and we'll have a look.

Simon

Hi Sir,

Let me explain what i am trying to achive. I have a sheet 12'' H, 8'' W. It contains labels of 3.5'' W, 1.3''H in rows and cols. Sheet contains 2 cols and 8 rows. But the problem is no space for Top and bottom Margin is 0 in the sheet, printer will have default Top ans bottom margin that we can't change through Progress.

My job is to print data exactly in the center of each labels. As u know, every printer will skip some space at the biginging of page. I need to handel that other wise allignment will goes wrong. Same case at the bottom also.That is the first case.

Second, If only one label has to be printed then, after printing it will moves to next page i.e. rest of the labels will be wasted. I think u got my problem now.

At present im skipping some space at the bigining so that printing will start from 2 row and continues till last but one row and jump to next page.

Regards,

Manohar
 
Right, I thought it might be something like that.

If the labels are on fan-folded paper, all you need to do is to use the OUTPUT ... OUTPUT CLOSE block with some PUT UNFORMATTED statements in the middle. If you use PUT UNFORMATTED then you don;t get any of the funny frame-handling from Progress that sometimes puts blank lines in odd places.

So, something like:
OUTPUT TO c:\temp\label01.txt.
PUT UNFORMATTED
skip(2)
"Label 1 Line 1" at 10
"Label 2 Line 1" at 50
skip
"Label 1 Line 2" at 10
"Label 2 Line 2" at 50
skip
"Label 1 Line 3" at 10
"Label 2 Line 3" at 50
skip
skip(5).

PUT UNFORMATTED
skip(2)
"Label 3 Line 1" at 10
"Label 4 Line 1" at 50
skip
"Label 3 Line 2" at 10
"Label 4 Line 2" at 50
skip
"Label 3 Line 3" at 10
"Label 4 Line 3" at 50
skip
skip(5).

OUTPUT CLOSE.

Of course, you still have the problem of printing the right hand label if the last print was a single label. You might want to try and find out how to make the printer go back a few lines, or you can manually reposition the printer to get around that.

When I print sheets of labels (using a Laser Printer with single page labels), I build up a temp-table containing the sheet number, label column, label row and lbel contents. Then I can show a grid on the screen and the user can select which labels he wants to use. I then change the temp-table label sheet/row/column information to only print on those labels. I have a routine that prints the labels in a matrix that reflects the different sizes of labels we use (8x3, 7x3, 6x3, 6x4). It was developed pretty much by trial and error, by working out where things should go, then printing test labels containing rows of 1s, 2s, 3s and so on, so I could then match the prints against the labels using the scientific method of holding them up on top of each other against a light. It takes a while, but you get there in the end.

If you did something like that and used individual sheets of labels rather than fan-folded/continuous sheets, you could put the same sheet through a few times to get prints on individual labels.

I hope that is clear enough. My code is a bit basic, so probably won't help you a great deal.

Simon
 
Back
Top