473,657 Members | 2,534 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Mar 19 '08 #1
1 6048
On Wed, 19 Mar 2008 05:43:00 -0700, John Graves
<Jo********@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
Mar 19 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4797
by: Larry Cheung | last post by:
I want to write a program to monitor each local printer When a print job is sending to a printer this program could be fired and capture the printed content as an image. It is easy to use API function FindNextPrinterChangeNotification() to get information such as TotalPages, TotalBytes, FileName, etc, but I have no idea how to capture the printed ontent, anyone could help? Many thanks!! Larry
7
5712
by: MouseHart | last post by:
I have written a small VB program which lists my music files on my computer, but I can't get it to print exactly the way I want it to. The data is viewed on screen in an MSFlexGrid named "TextGrid" and the following code will send it to a printer, but I was hoping to be able to send it to either a text file or directly to a Word for Windows file. Private Sub Command34_Click() Dim X%
0
2537
by: JerryB | last post by:
i am looking for a way to capture some data from a web DB that is set up to only allow a user to view one page of a query at a time or to print the entire query. i don't want to print and retype for obvious reasons. so i would like to "capture" the text of report that goes to the printer and put it into a DB in my app. so does anyone know if/how i can capture the text as it goes to the printer? thanks for any help.
2
3284
by: Salad | last post by:
It's been years since I captured printer output, basically I've forgotten how to do it. Can you refresh my brain and let me know how it's done if it can be done in Access? I don't want the output from a report per-se...I am looking at the output that would be sent to a printer with all the print codes and instead of going to a printer going to a file. A basic text file may be only a few hundred bytes in size but the text file, sent to...
2
5828
by: Benny | last post by:
Hello Experts, Currently I working on a web application using vs.net with C#. I require to create an invoice to a text file and print the file. I have no problem with writing to the text, but how can I print a text file using C# in a web application? Any articles that shows you how can this be done will be great.
1
6340
by: Patriicia | last post by:
A legacy application (I don't have the source code for the application) transmits reports to a printer. One of the reports that are sent to the printer needs to be inserted into a database. With VB.NET can I intercept items that are sent to the printer? Can I read what is being sent to the buffer with VB.NET and save to a file? Please let me know if this is possible with VB.NET. Should I be using a memorystream and window services? Please...
4
3366
by: jxiang | last post by:
I created a child form that is much bigger than the MDI form in VB.Net. I am trying to capture the whole child form and save as an image or sent to printer. I tried to use BitBlt to capture the child form but I can only capture the visible part of the child form whatever you scroll to any part of the form. I have read the article in site http://www.fengyuan.com/article/wmprint.html unforturely it is for C++ instead of VB.Net. I tried to...
2
1933
by: Ed Bitzer | last post by:
I can locate tab stops in a RichTextBox but have not found a way to maintain that positioning when I print. At the Knowledge Discovery Keys Site (http://www.kdkeys.net/forums/3122/ShowPost.aspx) Baily explains that character printing isn't really supported in VB .Net, the TAB method does not apply. The DrawString method is used to send strings to the printer. He notes a workaround is to write out the content to a file (where the TAB...
6
3244
by: Don | last post by:
How can I capture the name of the file a user right clicks in the open file dialog using the common dialog box control? I can capture the name if a file is double clicked, or OPEN is clicked after selecting a file, or CANCEL clicked, but if they choose to right click on a file and choose OPEN WITH option, then I can't seem to get the name of the file they selected. Don
0
8420
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8516
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.