473,473 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how do I print two or more printers simultaneously in one computer

9 New Member
I have two or more printers and one computer. I want to print to both printers the same document at the same time... Thus when I press print on my document both printers will print the file simultaneously. please help me :( . some one can help me in c # windows form . thank you .
Jan 18 '14 #1
6 4565
Luuk
1,047 Recognized Expert Top Contributor
Simplest way i can thing of is install something like pdfcreator.
Configure this so it will automatically create a PDF when it gets a job.
Configure a script that will print the PDF to both printers.

P.S. This is when you are working on Windows, if it should run on Linux it would be simpler ;)
Jan 18 '14 #2
damtoii
9 New Member
No. I'm looking of some codes or someone who help me to create that in c # windows form
Jan 18 '14 #3
Luk3r
300 Contributor
The absolute easiest way is to create a local PDF printer. When printing to that printer you can choose "Print to File", which will create an actual print file that can be sent to other printers. Once you "Print to File", your program would then make a copy of that file and send one copy to Printer1 and one copy to Printer2. I'd love to help you with the code but I don't have Visual Studio installed on this machine. Hope my explanation was enough to help!
Jan 18 '14 #4
damtoii
9 New Member
It was not clear for me to understand your explanation but thanks a lot for helping me. But how can I create a local PDF printer? Then It is automatically when I choose "Print to File" it will a copy to another printers or it will having some codes to do that
Jan 18 '14 #5
Luk3r
300 Contributor
It depends if you're using Windows XP or Windows 7/8. On Windows 7/8, you simply go to your Printers under control panel, add a new printer, choose local, and when it asks for a port, in the drop down list just choose "Print to File". When it asks what printer and driver, just choose something from Adobe or HP...any will really work. Then when you print to that printer it will ask you to save the document to a directory of your choosing. This is where the program that you write comes in to play. You would have your program search for the file, make a copy of it, then send the file to a real printer. The quickest way I know to do this would be via a shell command. See below:

Expand|Select|Wrap|Line Numbers
  1. Shell("cmd /c *.prnFileLocation* /b *PrinterShareLocation*
Here's an example with made up data.

Expand|Select|Wrap|Line Numbers
  1. Shell("cmd /c c:\TestPage.prn /b \\printserver1\Printer1
The shell command I've provided is in Visual Basic because that's the language I know best. But you should be able to convert to C# pretty easily. Good luck!
Jan 18 '14 #6
Luuk
1,047 Recognized Expert Top Contributor
If you really want to create your own printer driver,
than you should google for: printer driver sample code microsoft

The first link leads to the website from Microsoft, a page called: "Windows Driver Kit Samples Pack"

There's even some sample code available....

1st Question:
Are these two printers of identical type?
If they have different printer-drivers than the option to print via file will not work.

2nd Question:
Why not simply print 2 copies on 1 printer?
Jan 18 '14 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Vanessa | last post by:
Hi, I'm trying to loop through all the printers in my computer system using WMI. However, I found out that it doesn't really get the correct number of printers in my system. I have 16...
1
by: Ofer B. | last post by:
Hi How can I get the installed printers in the client side This code return the installed printers on the server side, but I want the user to be able to print from his own computer and not...
3
by: KWOK | last post by:
Hi all, I want to use a printDocument and PrintPreviewDailog to print more pages. I can view more pages in printPreviewDialog, but I click a print button, it only print a last page. my...
2
by: TThai | last post by:
Hi, Does anyone has problem with crystal report in dotnet that when requesting more than one copy in the dialog box, it only prints one copy? Any help is appreciated. Currently, we asked the user...
20
by: MLH | last post by:
120 MyString = "How many copies of each letter do you need?" 150 MyVariant = InputBox(MyString, "How Many?", "3") If MyVariant = "2" Then MsgBox "MyVariant equals the string '2'" If...
1
by: poison.summer | last post by:
Hello I use the following function to print out the time. But I wonder whether I can be more accurate like print out the microsecond Thanks a lot! void Print_time() { time_t now;
0
by: karinya_89 | last post by:
I want to print more than one XML file at a time i.e. the user click OK in ShowPrintDialog() only once and all the XML files in a folder are printed out. Now i can print only one XML file at a...
2
by: nikkysetyawan | last post by:
Hi, Anyone can help me in VB? I've 2 computers, First Computer have 3 Serial port printer attached to COM1,COM2,and COM3. The Second computer doesn't have any printer. Can anyone tell me the...
0
AllusiveKitten
by: AllusiveKitten | last post by:
Hi kind and helpful people... At work I am creating a database and reports that will be used by multiple people. What I need is for my reports to print to a specific colour printer and be manual...
3
by: ahilllenb | last post by:
I have a Zebra LP2844 set up with a USB direct to my computer. I then shared the printer with my office network. Then I copied the front end database from my computer to another computer running...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.