Solved

Capture Printer output and convert to ASCII text file.

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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 process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

772 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