|
Post by honky on Apr 21, 2021 19:49:51 GMT
Good morning all, Can we start printing several files in succession by the program? How to do ? Thank you for.
|
|
|
Post by honky on Apr 22, 2021 4:34:34 GMT
Good morning all, Can we start printing several files in succession by the program? How to do ? Thank you for. Folder: "Foyer A" contents many (14) files, we should want print (hard copy) the contents of the 14 files on 14 Pages (Leaves). dim info$(10,10) do$="Heaters (créé ";day$;")" files DefaultDir$+"\"+do$;"\";"Unity A", "*.txt", info$() nbim$=info$(0,0):nbim=val(nbim$) for xx=1 to nbim a$=info$(xx, 0) print a$'******good******** '...???...???...lprint...???...??? next xx
Is it possible? Thank you for.
|
|
|
Post by tsh73 on Apr 22, 2021 7:51:40 GMT
So I believe your question about starting new page then printing? try DUMP it did created for me 2 files then PDF-printed
read n print "Number of pages: ";n for i = 1 to n print "page ";i read aLine$ while aLine$<>"*over*" print aLine$ lprint aLine$ read aLine$ wend dump next i
print "*all done*" end
data 2 data "Jack and Jill" data "" data "Jack and Jill" data "Went up the hill" data "To fetch a pail of water" data "Jack fell down" data "And broke his crown," data "And Gill came tumbling after." data "*over*"
data "Humpty Dumpty" data "" data "Humpty Dumpty sat on a wall," data "Humpty Dumpty had a great fall." data "All the king's horses and all the king's men" data "Couldn't put Humpty together again." data "*over*"
|
|
|
Post by honky on Apr 22, 2021 12:15:37 GMT
Thank you tsh73 I understand that we must to open the file(s) and print (copy) line by line. That's it ? But if I print multiple files in a loop. How will the loop wait for the printer to finish one file before printing the next one? My loop cannot receive a signal: "Busy".
|
|
|
Post by tsh73 on Apr 22, 2021 12:23:33 GMT
You don't check You just send to printer It is going to Windows print queue Windows dispatches things, keeping order - you should not worry.
|
|
|
Post by honky on Apr 22, 2021 13:40:01 GMT
Ok,tank you; hope there will be no indigestion.
|
|
|
Post by Rod on Apr 22, 2021 15:40:50 GMT
The individual print jobs get queued by Windows and the printer will work through them usually without any problems.
The issue to manage is if the printer fails with a printer jamb or paper out fault.
Modern printers and Windows try to handle that within the print queue so you don’t need to code for that.
But the user can get it wrong and clear the queue. Or the printer just fails, this is what you need to cater for. The user has either to print the whole lot again even though they have half of it. Or, you give the option to reprint certain pages or from a certain point. Ideal job for a list box or check box dialogue.
|
|
|
Post by honky on Apr 22, 2021 16:56:34 GMT
No worries about that; the files remain available for "manual" printing. How many Ko, Mo do printer buffers ?
|
|
|
Post by honky on Apr 22, 2021 23:30:12 GMT
No worries about that; the files remain available for "manual" printing. How many Ko, Mo do printer buffers ? Still questions: If I print in loop many files of different names (opening the files and printing line by line). Will the names of the files appear ? Or will the contents be contatenated without interruptions, and without files names ?
|
|
|
Post by tsh73 on Apr 23, 2021 6:29:58 GMT
Did you run my program? for me it printed two different pages and only thing printed is lines program send so no filenames - unless you add it in your program (just LPRINT filename$ before printing file content)
|
|
|
Post by honky on Apr 23, 2021 10:29:24 GMT
Did you run my program? for me it printed two different pages and only thing printed is lines program send so no filenames - unless you add it in your program (just LPRINT filename$ before printing file content) Ah okay, that's a good tip. Thank you.
|
|