Solved

Capture Printer output and convert to ASCII text file.

Posted on 2004-09-23
3
1,330 Views
Last Modified: 2013-12-26
Hi All,

I need to develop a tool that automatically creates a Generic/Text only printer on FILE port when no such printer exist in the local m/c. Also when some files are choosed to print thro the Generic Printer, it has to generate a ASCII text file and have to store it in a pre-defined path set thro this application.

I successfully created a Generic printer on FILE port. I like to know the ways to supress this file name pop-up and I have to supply the file name internally thro the application. Here for each print thro the generic printer on FILE port systems asks the File name. I'm unable to suppress the file name prompt pop-up.

Could you pls guide me how to supress that pop-up and programatically assinging the FILE name, also give me some code samples url.

Thanks in advance,
Arnee...


0
Comment
Question by:Arnee_Senthil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Expert Comment

by:x_terminat_or_3
ID: 12134036
You know, in VB you can just open a file and 'print' to it.  You can set the filename in the code or ask user info.

Please tell us if this will help you.


With kind regards



Ramses (x_terminat_or_3)
0
 
LVL 12

Accepted Solution

by:
fulscher earned 125 total points
ID: 12137064
Arnee,

I just checked; the function to ask for a file name is part of the windows subsystem. I think you can't override that.

I see three options:

1/ find a text printer driver which does not ask for a file name
2/ redirect the printer output to a program
3/ create a small utility which waits for the printer dialog to pop up, fills in a name into the text field and closes the dialog.

Option 2 is probably the easiest; there is a program called RedMon (Redirection Port Monitor) which is supposed to do this. Check out http://www.cs.wisc.edu/~ghost/redmon/en/redmon.htm .

Redmon redirects the output to the standard input of any program - so, you need to write a small program which reads input from stdin and creates a file which you then can process by you program.

HTH, Jan
0
 
LVL 1

Author Comment

by:Arnee_Senthil
ID: 12159323
Hi HTH,

I used ur 3rd idea and developed a small prog that monitors the Task Manager for specified pop-up window's name. Once it caught that window, it pastes the file path and name and sends that <Enter> key to close the pop-up. I got the task manager watchdog prog. from the following url.

http://www.zarr.net/vb/download/codedetail.asp?code=11

Thanks a lot,
Cheers,
Arnee...
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question