2 Printer Drivers

Hi everyone,

I need to print to two printer drivers. One to an actual printer, the other to a PDF driver.  The problem is, I need to print to each Driver concurrently (ie, a line at a time)  When I change the printer in VB, It would seem that the EndDoc method is called for the printer I have just changed from. This results in a single Line Printing on one page and many pages.
Can anyone help?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I am not sure if you can print concurrently from the same program, however, depending upon what you are printing( a file saved to disk perhaps), a work around would be to write another program that just prints that file to one of the printers..maybe pass the file name and printer info to the program as arguments...

Maybe I am missing your question..but it is just a thought.
It is correct (as far as I know) that when you re-set a 'default' printer that EndDoc method is fired.
I also think that the best way to do it is creating an OCX or DLL, instantiate it twice, each time which a different printer setting and spool the data through it!
I think you'll need to use API's to print to the second printer...

Check out these microsoft pages:

HOWTO: Print Line-by-Line to a Printer

HOWTO: Print Multiline Text Box Using Windows API Functions


The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

You'll need to use API's functions to print with two drivers. The VB Printer driver allow a few bugs. You'll need create a code to replace the printer functions.
Yep, that's what I said...

You need to use APIs to print to the second printer...


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Thanks for the points! Glad I could help!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.