Announcement

Collapse
No announcement yet.

printfil equivalent

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

  • printfil equivalent

    I've been using a program called PrintFil for some time.
    Print from DOS, DOS print USB, Unix, Linux to Windows Printers: USB, GDI, PDF, Fax, Virtual. Capture PRN:, LPT1:, LPT2: .. LPT9: as well as COM1: .. COM9: and redirect the print jobs, with extras like print preview, BMP merging, PDF e-mailing.


    It basically captures print data sent to any LPT port and stores it to a file, where it can be sent to any Windows printer.

    I know they use some networking functions to accomplish this.
    How to print reports sent to the LPT1: port from DOS when the Windows PC is not connected to the internet.


    I'd like to do something similar, that is: capture LPT port to a file. Once that's done I know what to do. Any ideas on where to start?

    I know there are lots of alternative ways to capture LPT ports but for many reasons I'd like to do what PrintFil does.

  • #2
    AFAIK, you can't just say "ANY Windows Printer" since by the time it goes out the port (serial, parallel or USB), the data have already been formatted for that specific printer.

    I think if you spool the printing, you can later select a printer and be OK, but I don't know how to do that off the top of my head. Maybe some kind of setting in "control panel" can handle that? Or maybe in "printer properties" (eg 'print to file)???
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      All I really care about is capturing a LPT port to a file.
      I saw some code here somewhere about capturing traffic over a network port, which might be on the right track.

      Comment


      • #4
        Old stuff so a bit rusty but I think in command prompt
        Net Use LPT1 \\computername\shared folder\filename
        If you want the file to be on the same computer I think you need to share a folder then address it as if it were a network folder
        later
        Did some testing is a little more complicated
        Set up whatever printer you want to capture on an LPT port (say LPT9)
        Then create a Generic Text Only printer to file and then share it (default name will be Generict)
        Then in command prompt
        Net Use LPT9: \\computername\generict
        When you print up will pop the request for a file name.
        I am assuming you are doing this as the original program is DOS and has the port programmed into the computer
        Last edited by John Petty; 5 Sep 2009, 02:04 PM.

        Comment


        • #5
          I looked at the docs in the links supplied. That printfil program does a number of different things.

          When you say you want to do something similar to PrintFil, I think you are going to have to tell us your operating system... what you did one way under MS-DOS you just don't do that way under Windows.

          And... I think it's important we would know which one of those things you want to accomplish, so Mr. Petty has asked the corect question...
          I am assuming you are doing this as the original program is DOS and has the port programmed into the computer [?]
          Your statement here...
          All I really care about is capturing a LPT port to a file
          .. suggests the possibility that the parallel port might be in use for purposes other than printing... eg, there were some "file transfer" utilities which used the parallel port; and I've run into at least a couple of "hardware interface programs" used a parallel port, too. (On MS-DOS, not under Windows).

          Enquiring Minds Want to Know....
          Michael Mattias
          Tal Systems (retired)
          Port Washington WI USA
          [email protected]
          http://www.talsystems.com

          Comment


          • #6
            This is a DOS program running under XP running at a client's location.

            I could use NET USE sometimes but not all the time.
            For instance, they might want to route to a different printer when they may or may not actually have a physical printer attached to LPT1.
            This could probably still be done with a set of NET USE batch files, but it would be different on each machine.

            We started using PrintFil, which fits the bill except for two things.
            1) it is relatively expensive
            2) it is quirky. It seems to give a lot of error messages but mostly prints anyway.

            Also, Printfil does a lot more that we need (like the ability to create multiple sets of printer command strings). I think if I had something similar yet simpler in design, it might work better.

            Lastly, I'm very curious on how they do it! Reading the PrintFil FAQ just made me more so.

            Comment


            • #7
              Lastly, I'm very curious on how they do it! Reading the PrintFil FAQ just made me more so
              Under MS-DOS, you can just peek into the data coming thru a port; there are likely examples here. And since that Printfil *appears* to only handle character data, it's really not like it requires a Nobel Prize in physics to program. (It looks like the images are handled separately).

              Under Windows, this is a much 'iffier' proposition. First, you have to be able to access hardware ports. Then, you have to allow for the fact that all graphics data - and under 'pure' Windows, even 'text' is really 'graphics' - are already formatted for that printer by the driver.

              Based on your description, NET USE as suggested by Mr. Petty sounds like the best (quickest, cleanest and least expensive) solution.

              Alternately, "if" the application offers a "print to file" option, you could write something to read that file and do genuine real Windows' printing, eg using the XPRINT functions provided in the PB compiler, or the regular Windows' API printing functions.

              For that matter, I think there are already some relatively inexpensive utilities around to do just that.

              MCM
              Michael Mattias
              Tal Systems (retired)
              Port Washington WI USA
              [email protected]
              http://www.talsystems.com

              Comment


              • #8
                The biggest problem for me with NET USE is there are probably 40 computers with several different needs for printing. I could set up a unique set of batch files for each computer, but even then the user would need to run the correct batch file and then print. That's probably a hard bargain to sell. PrintFil works pretty well, but it's about $130 per seat (retail). I've become a reseller and It's still around $90 per seat.

                NOW, if I had an alternative that I wrote in PB then there is an opportunity to make a few thousand dollars. I would do exactly what you said: write to a file and then use PB to xprint to whatever printer the user selects.
                That is what Printfil does.

                Comment


                • #9
                  , if I had an alternative that I wrote in PB then there is an opportunity to make a few thousand dollars
                  ".... 40 computers.... $130 per seat (retail)" ==> $5,200.

                  Heck of a start?
                  Michael Mattias
                  Tal Systems (retired)
                  Port Washington WI USA
                  [email protected]
                  http://www.talsystems.com

                  Comment


                  • #10
                    Dos2usb

                    Shawn,

                    I have been using a nice and inexpensive program to solve that very problem with DOS programs running in Windows machines.
                    The price is below 20.00$ for a single copy and 13.99$ for 40 seats.

                    DOS2USB Captures MS-DOS Print Job from LPT or PRN and Redirect it to any Windows Printer like USB printer, GDI printer, Network printer, Fax Printer, Virtual Printer, IP Based Printer with ANSI, OEM, Latin, Greek, Russian, Portuguese, Turkish and Hebrew Code Page (Language) Support.


                    This enabled me to get rid of my old OkiData printer that I sometime needed to maintain my old Dos programs.

                    But .... if you do write a PB program you will make more money
                    Old QB45 Programmer

                    Comment


                    • #11
                      thanks Guy, I'll check it out.

                      this might be a start for me though:

                      Comment

                      Working...
                      X