• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1390
  • Last Modified:

Capture Printer output and convert to ASCII text file.

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
Arnee_Senthil
Asked:
Arnee_Senthil
1 Solution
 
x_terminat_or_3Commented:
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
 
fulscherCommented:
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
 
Arnee_SenthilAuthor Commented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now