Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need a Printer/Tester
#1
A little routine I wrote which should print out a file to the printer:

Code: (Select All)
$COLOR:32
PrintScreen = _NEWIMAGE(850, 1100, 32) 'to represent an 8.5" x 11" sheet of paper
SCREEN PrintScreen
File$ = _OPENFILEDIALOG$("Choose file to Print", _CWD$, "*.*", "Any File")
OPEN File$ FOR BINARY AS #1

CLS , White, PrintScreen
COLOR Black, 0
DO
    LINE INPUT #1, temp$
    PCOPY 0, 1
    PRINT temp$
    IF CSRLIN >= _HEIGHT - 3 THEN 'we probably scrolled the page.  Rip off this sheet of paper and start a new page!
        PCOPY 1, 0
        _PRINTIMAGE PrintScreen
        CLS , White, PrintScreen
        PRINT temp$
    END IF
LOOP UNTIL EOF(1)
CLOSE

Problem is, when I went to test it, my printer is all out of ink and such.  Tongue

Anyone want to give this a test run for us?  Uses _PrintImage, so is a Windows-Only program, so Linux and Mac folks can't make yse of this until we expand the functionality to include them.

If you can, try this with a short, 1-page program (Hello World would work fine.)  Then try it with something that might take a couple of pages to print out.  It *should* sort things out and print across multiple pages without issue.

I hope, anyway.  Smile


Note:  IF this prints out 1000 pages and doesn't stop....  I apologize in advance!  Big Grin
Reply


Messages In This Thread
Need a Printer/Tester - by SMcNeill - 06-03-2024, 11:08 PM
RE: Need a Printer/Tester - by bplus - 06-04-2024, 12:11 AM
RE: Need a Printer/Tester - by SMcNeill - 06-04-2024, 02:23 AM
RE: Need a Printer/Tester - by bplus - 06-04-2024, 09:02 AM
RE: Need a Printer/Tester - by bplus - 06-04-2024, 09:20 AM
RE: Need a Printer/Tester - by JRace - 06-04-2024, 03:13 AM
RE: Need a Printer/Tester - by bplus - 06-04-2024, 10:01 AM
RE: Need a Printer/Tester - by SMcNeill - 06-04-2024, 10:17 AM
RE: Need a Printer/Tester - by bplus - 06-04-2024, 10:28 AM
RE: Need a Printer/Tester - by SMcNeill - 06-04-2024, 10:53 AM
RE: Need a Printer/Tester - by SpriggsySpriggs - 06-04-2024, 11:12 AM
RE: Need a Printer/Tester - by bplus - 06-04-2024, 11:20 AM
RE: Need a Printer/Tester - by SMcNeill - 06-04-2024, 11:30 AM
RE: Need a Printer/Tester - by SpriggsySpriggs - 06-04-2024, 06:22 PM
RE: Need a Printer/Tester - by bplus - 06-04-2024, 07:11 PM



Users browsing this thread: 14 Guest(s)