Announcement

Collapse

Maintenance

The forum could be offline for 30-60 minutes in the very near future for maintenance (said 3pm Pacific). I was behind on getting this notice. I do apologize.
See more
See less

Lance’s Dosprint – A new life to DOS printing – some tweaking ..

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lance’s Dosprint – A new life to DOS printing – some tweaking ..

    Hi !

    I usually never sit down to write stuff that has already been written, I am the kinda programmer that would only write code for something that has not been written before, *uuumm the lazy one*** . . So if there is screen layouts that I could use.. I will use . . you know use as in call the function , shell , purchase . .etc . .

    Most of these come free to copy, some you gotta buy and it’s those that you pay dollars for that you like gonna moan and groan when It like ain’t working the way you want it to . . (My currency is like 10 to the dollar, so won’t you just love to spent your money here in South Africa – what I paid to buy Lance’s DOSPRINT is like a months rental *hehe*) ..

    USB printers a headache for someone like me, who has written software for the commercial point of sale market . . . I see Lance’s DOSPRINT and I say kewl, this is IT ! ! ! I purchase get an email of the proggy like real quick ( I just hate when Microsoft’s outlook decides that the .exe file is unsafe for me *hehe*).

    I must admit it was the quickest implementation I ever did to like give a new life to my program . . .

    When I wrote the original code ten years ago . . I still used LPRINT . . so now I needed another quick fix . . This is what I did . .

    1) Used a program prn2file.com that diverts all LPRINT to a file of your choice. (In this case spool)
    Define a function key to trigger ( In this case F5) – Code looks like this :
    Code:
       key (5) on 
       on key(5) gosub print_s
       ..............
    print_s: 
            DEF SEG = &HB800’ These two lines just saves the current screen  
            BSAVE"X:SCREEN-1", 0, 4000 :'rem save in a ramdrive called X
            print fre(""):'flush . . like it works ??
            mempack
            SHELL"PRN2FILE.COM C:\RAM\SPOOL."
            shell"WINLINK.EXE DOSPRINT.EXE C:\RAM\SPOOL."
            SHELL"DEL C:\RAM\SPOOL." ‘Deletes the file printed
            print fre("")
            DEF SEG = &HB800 ‘These two lines restores the screen
            BLOAD"X:SCREEN-1", 0 'see MA no garbage on screen
            mempack
            return
    This works real fine . . . Now comes the HOWEVER . .

    I just can’t get to print my .jpeg or bmp images , may be someone here can help me :-
    all I see(printed and on preview) is a cute black box and nothing more . .

    This is the code:-
    Code:
    OPEN"O",#1,"spool"
    PRINT#1,""
    REM PRINT IMAGE
    PRINT#1, SPACE$(11);CHR$(27,34,66) + "c:\programs\witel.jpg" + ",39,10,B" + CHR$(34);
    Close#1
    ‘run dosprint
    And lastly a wish list for DOSPRINT :-

    1) Incorporate something like PRN2FILE.com into the package
    2) Have a switch in the command line that will not display the file that it will print – (You don’t want someone changing the original document (Eg: An Invoice etc) using a normal editor) – Hey even better have command switch that will allow an editor to edit the file in your preview screen . . that would be kewl to use, if and when you want the person using the file to be able to edit it . . (A icon that will allow an edit if the switch is used)
    3) Off course a button to delete the file after printing ! ! !

    In conclusion . . I recommend DOSPRINT and it’s a great li’l proggy

    Bye now . . .

    JustBASit

    [email protected] www.compubyte.co.za



    [This message has been edited by Basit Bulbulia (edited November 15, 2003).]
    JustBASit

    -------------------
    www.compubyte.co.za
    ------------------- [email protected]

  • #2
    Firstly, thank you for the kind words! The dawn of USB-connected and Windows-only printers some [5+ years ago] was predicted (or maybe intended) to render DOS apps to the grave and laid waste to the millions of man-hours that have been invested in writing "legacy" software...

    DOSPRINT was initially developed as an in-house utility designed to protect our investment in DOS software development. Naturally, we're very happy that others can use DOSPRINT to protect their investment too!

    I just can’t get to print my .jpeg or bmp images , may be someone here can help me :-
    all I see(printed and on preview) is a cute black box and nothing more . .
    ...
    PRINT#1, SPACE$(11);CHR$(27,34,66) + "c:\programs\witel.jpg" + ",39,10,B" + CHR$(34);
    If the image cannot be found/loaded/processed, nothing is printed or displayed. However, you will get a single-pixel wide border around the "reserved" image location if the B or T options are specified.

    However, if the image could be found/loaded/processed without any detectable errors occurring, then the area will be filled.

    Therefore, if the image you get is not what you had expected to see, then there are most likely cause of the failure is either the image size, color depth, or the image file is corrupt.

    And lastly a wish list for DOSPRINT :-
    1) Incorporate something like PRN2FILE.com into the package
    2) Have a switch in the command line that will not display the file that it will print – (You don’t want someone changing the original document (Eg: An Invoice etc) using a normal editor) – Hey even better have command switch that will allow an editor to edit the file in your preview screen . . that would be kewl to use, if and when you want the person using the file to be able to edit it . . (A icon that will allow an edit if the switch is used)
    3) Off course a button to delete the file after printing ! ! !
    Thanks, I'll add these to the wish list!

    Regards,
    Lance Edmonds
    www.dosprint.com

    Lance
    mailto:[email protected]

    Comment

    Working...
    X