Solved

Capture Printer output and convert to ASCII text file.

Posted on 2004-09-23
3
1,299 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

920 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now