Capture text sent to a printer to a file.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?Sm9obiBHcmF2ZXM=?=

    Capture text sent to a printer to a file.

    Does any one know how to caputer text data sent to a printer to a file. I
    have seen a window service that captures text data sent to a printer on the
    server and save it to a file. I would like to know how to do this. I have
    many reports that are produced on an IBM mainframe as text that I would like
    to send to a Windows' sever as printer output but capture to a text file.
    Currently we use an FTP process and a print to printer would reduce new
    report setup time by a few hours each and reduce the mess.

    Thansk,
    --
    John Graves
  • Peter Duniho

    #2
    Re: Capture text sent to a printer to a file.

    On Wed, 19 Mar 2008 05:43:00 -0700, John Graves
    <JohnGraves@dis cussions.micros oft.comwrote:
    If this is not the right newsgroup do you know what one I should use?
    I'm sure I have no idea, sorry.
    I can control printer driver on the server that will be receiving the
    text
    file from the mainframe.
    But can you control how the mainframe uses the printer driver? That is,
    can you require that the mainframe print to the text printer driver?
    I have setup a pcl and text only printer on the server and ran test
    from
    the mainframe.
    The reports are sent to the server and appear as *.SHD and *.SPL in the
    windows spool directory.
    This is true for the pcl and text (they are in EMF format).
    >
    I would like to write a .NET c# windows service on this server to
    convert
    these files from EMF to text and then
    remove them from the spooler the correct way.
    >
    Any references about controling the spooler would be appreciated.
    I'm sorry, but I don't have any. If you want access to those files,
    you'll need to hook into the spooler somehow, because otherwise they could
    appear and disappear before you get a chance to look at them. Parsing the
    EMF to extract any text should be relatively simple, but you need reliable
    access to the EMF.

    Just from your description so far, it seems like the easiest thing would
    be just to print to the text driver, which already should emit the results
    to a file. Then you can just get that text file rather than messing
    around with the spooler.

    Other than that, I don't have any specialized knowledge in the area you're
    asking about. So if you have other questions that you really want to post
    here, someone else will have to answer them. If you get an answer,
    great...but if not, you should really reconsider my advice that this isn't
    a great place for the question. You'd be better off finding a forum where
    there's more expertise on the topic, so that you have a better chance of
    getting a useful answer.

    Pete

    Comment

    Working...