Printing Multiple Documents

I am trying to figure out if it is possible to print multiple documents (batch printing) in the web browser without using the default browser print prompt.


I don't know if this is possible since I also want to display a queue of print jobs within my application and I know this sort of thing would normally be done client side.


Any insights would be very much appreciated!


5 Replies

KB Kurthis Banu Abdul Majeeth Syncfusion Team September 8, 2021 01:27 PM UTC

Hi Matthew, 


We have cross checked your requirement. In your requirement, you want to print multiple documents without default browser print functionality. Document Editor will print the current document by providing print window.  


Please check with below demo sample. 

Demo Sample Link: 

In Above print button click, it’s executed the default browser print.  
We need some clarification regarding your requirement. Can you please share some detailed description about your use case scenario in detailed (to print multiple documents without prompting print window)? That will be helpful for us to proceed further and provide you solution at earliest.  
 
Regards, 
Kurthis Banu A. 



MA Matthew replied to Kurthis Banu Abdul Majeeth September 8, 2021 03:42 PM UTC

Hi Kurthis,


Thanks for the response. As an example of our use case, we would want the user to be able to select many files that we have stored on our server (Byte[] format) and give the user the ability to then send them to a local or network printer. On our website we would like to also display some sort of visual print queue so the user can see all the current print jobs for their printer.

With the current print functionality it would be much to slow for our users to be opening each document in order to print them. We expect users to want to print 10's if not 100's of documents at a time and it would be ideal if we could grab the documents they want from our server (database) and somehow send them to a local or network printer of theirs and display the print jobs progress.

I don't know if this would be possible for a web application, but since we're using Blazor Server I hoped there may be a way.


Thanks in advance.



KB Kurthis Banu Abdul Majeeth Syncfusion Team September 9, 2021 12:32 PM UTC

Hi Matthew, 

We are cross checked your requirement. We need some clarification regarding your requirement. 

Please share below details to proceed further: 
1.       Share types of document you have used for print? 
2.       Can you please confirm which Syncfusion-product like either Documenteditor or any other product to display document before print? Because using “Document Editor” you can display only one document at a time and send for print. 

Please share the requested details. This will be helpful for us to investigate further and provide you the solution at the earliest. 

Regards, 
Kurthis Banu A. 



MA Matthew replied to Kurthis Banu Abdul Majeeth September 9, 2021 02:42 PM UTC

Hi  Kurthis,


We are looking at allowing the user to select multiple documents from our database in docX and PDF format and send them to a printers print queue. We would like to somehow display the print queue to the user so they can watch the progress. Currently we have implemented single document printing with both the document editor and the PDF viewer but this only works for a single document at a time like you said.


So far I am thinking we should use the Syncfusion tooling to convert all the documents to PDF format and  merge them into a single document that can then be sent to a printer. The only issue with this is that all the documents would technically then just count as a single print job and we are looking to keep track of a print job per document.


I don't know if it would be possible to display a printers queue to the user in the browser and we may need to create a local windows app for this level of printing functionality but any insights would be much apreciated, thanks.



KB Kurthis Banu Abdul Majeeth Syncfusion Team September 10, 2021 12:03 PM UTC



 
 Hi Matthew,  
 
 
 
Regarding: PDF Viewer


Sorry for the inconvenience. In our PDF Viewer control, we do not have the support to print multiple PDF documents at a time. We can only print the single document at a time using the print icon in the default toolbar or programmatically using the below code snippet.

Code Snippet:

 
<SfButton @onclick="clicked">Load Document</SfButton>   
   
<SfPdfViewerServer @ref="@Viewer"> <PdfViewerEvents DocumentLoaded="@documentLoad"></PdfViewerEvents> </SfPdfViewerServer>   
   
public void clicked()   
    {   
        byte[] byteArray = System.IO.File.ReadAllBytes("wwwroot/data/HTTP Succinctly.pdf");   
        string base64String = Convert.ToBase64String(byteArray);   
        Viewer.Load("data:application/pdf;base64," + base64String, null);   
   
    }   
    private void documentLoad(LoadEventArgs args)   
    {   
        Viewer.Print();   
    }   
 
 
 
Regarding: Document Editor  
 
we do not have the support to print multiple Word documents at a time. We can only print the single document at a time using the print icon in the default toolbar or programmatically using the below code snippet.

 
 
<SfButton IconCss="e-de-icon-Print" CssClass="title-bar-btn" @onclick="Print">Print</SfButton> 
 
<SfDocumentEditorContainer @ref="container" Height="590px">            </SfDocumentEditorContainer>
 
@code{ 
 
SfDocumentEditorContainer container;
 
private async void Print(object args)    {        SfDocumentEditor documentEditor = container.DocumentEditor;        await documentEditor.Print();    }
 
} 
 

Please let us know if you have any concerns about this. 
 
Regards, 
Kurthis Banu A. 


Loader.
Up arrow icon