Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need a Printer/Tester
#7
i think this is better
Code: (Select All)
$Color:32
$Resize:Smooth
'Resize is so we can drag/resize the screen so it fits on a monitor
PrintScreen = _NewImage(850, 1100, 32) 'to represent an 8.5" x 11" sheet of paper
Screen PrintScreen
f& = _LoadFont("arial.ttf", 18)
_Font f&
File$ = _OpenFileDialog$("Choose file to Print", _CWD$, "*.*", "Any File")
Open File$ For Binary As #1
If _FileExists(File$) = 0 Then System
Cls , White, PrintScreen
Color Black, 0
height = Int(_Height / _FontHeight(f&) - 3)
page = 1
fname$ = Mid$(File$, 1, _InStrRev(File$, ".") - 1)
Print: Print
Do
    Line Input #1, temp$
    'PCopy 0, 1
    nline = nline + 1
    Print nline; temp$
    If CsrLin >= height Then 'we probably scrolled the page.  Rip off this sheet of paper and start a new page!
        'PCopy 1, 0
        '_PrintImage PrintScreen
        _SaveImage fname$ + Str$(page) + ".PNG", PrintScreen
        page = page + 1
        Sleep 'A break so we can see which page we just printed
        Cls , White, PrintScreen
        'Print temp$   ' why print again
        Print: Print
    End If
Loop Until EOF(1)
'PCopy 1, 0
_SaveImage fname$ + Str$(page) + ".PNG", PrintScreen
Sleep
Close
Cls , White, PrintScreen
Print "Files ready"

   

   

   
b = b + ...
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: 11 Guest(s)