Welcome Guest Search | Active Topics | Sign In | Register

Using print method to Print simultaneously to multiple printers Options
Biocair
Posted: Wednesday, June 9, 2021 7:55:55 AM
Rank: Newbie
Groups: Member

Joined: 7/31/2019
Posts: 1
Hello,

I am using the HtmlToPdf.ConvertHtml method to convert the HTML documents into PDFs and then pdfDocument.Print method to print that PDF.
I want to deploy the print service in Print server environment. this print server hosts multiple printers (i.e. 50 printers). multiple users will print the documents and they will be saved in a database table as HTML. A windows service will process the HTML and convert them into PDF and prints them.

Currently I'm using WaitableTask.IsDone method to check whether printing has finished so that it can move to the next item in the queue. But as the user base is growing and print queue is getting larger I want to run printing simultaneously to multiple printers.

I would like to can I achieve this using EO.pdf? Can you please guide me on how to do so?

Thanks

eo_support
Posted: Wednesday, June 9, 2021 3:37:19 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

The easiest way for you to do so is to create a number of threads and then in each thread you do something like this:

Code: C#
WaitableTask task = doc.Print(..);
task.WaitOne();


And then you can move to the next document. For example, you can do this in a loop. Obviously when while you can use multiple threads to process the document queue, you should not try to access the same printer from multiple threads.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.