We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

pdf batch printing

is it possible to batch print pdf files ?
i tried silent print sample but i did not worked.

7 Replies

MN Meikanda Nayanar Syncfusion Team May 16, 2013 04:14 AM UTC

Hi Murat,

Thank you for your interest in Syncfusion products.

Yes, it is possible to batch print Pdf files using our Essential PdfViewer. We have checked our silent printing sample and we are unable to reproduce any issue. Could you please send us the pdf documents you are trying to print. This will be more helpful for our further investigation.

Please let us know if you have any concerns.

Regards,

Meikandan.



TA takeimage July 24, 2013 08:15 AM UTC

before using Syncfusion, i have been using this pdf printer to print pdf in batch vb.net, but i think your product is also working well for me.


MN Meikanda Nayanar Syncfusion Team July 30, 2013 04:53 AM UTC

Hi,

Thank you for your interest in Syncfusion products.

We are glad to hear to hear that Syncfusion Pdf Viewer helps you print the PDF document in batch process.

Please let us know if you have any concerns.

Thanks,
Meikandan


DM Don Mason replied to Meikanda Nayanar April 12, 2016 08:50 PM UTC

Hi,

Thank you for your interest in Syncfusion products.

We are glad to hear to hear that Syncfusion Pdf Viewer helps you print the PDF document in batch process.

Please let us know if you have any concerns.

Thanks,
Meikandan

can you please give a code sample for batch printing?
I am able to perform silent printing but I have multiple documents and need to batch them to the printer.

Thank You 


SS Sathish Sivakumar Syncfusion Team April 13, 2016 04:24 PM UTC

Hi Don,                  

Thank you for using Syncfusion Products.

Printing the Document using System.Drawing.Printing is not supported in Windows Service.

The following MSDN link explains the problems occurred while Printing the document using Windows Service.

https://msdn.microsoft.com/en-us/library/system.drawing.printing.aspx

"Classes within the System.Drawing.Printing namespace are not supported for use within a Windows service or ASP.NET application or service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions."

As per the documentation, the System.Drawing.Printing namespace is not encouraged to be used within a Windows Service.

However we have created the sample for batch print the PDF Documents from the directory by Exporting the PDF document as Images from the windows service, to the local machine.

Code Snippet for Exporting PDF Documents from the directory to Metafile images in Windows Service:

string[] files = Directory.GetFiles("C:/tmp/", "*.pdf");

int pagecount = 0;

foreach (string file in files)

{

//create an instance for PdfLoadedDocument

PdfLoadedDocument ldoc = new PdfLoadedDocument(file);

//Load the instance of PdfLoadedDocument in PdfDocumentView to export into images

view.Load(ldoc);



//ExportAsMetafile return the metafile images of each page of the loaded pdf document

Metafile[] images = view.ExportAsMetafile(0, view.PageCount - 1);


//save the images in local drive

foreach (Metafile image in images)

image.Save("C:/tmp/" + pagecount++ + ".emf");
}

**Note: Windows Service does not Support relative path to accessing the path, so we used the absolute path for accessing and saving the document.

Please find the Sample to Export PDF documents into Images using Windows services in the below link:


http://www.syncfusion.com/downloads/support/forum/108785/ze/ExportAsImage-2058545412


We have also attached the sample for batch print the exported images of the PDF documents manually from the below link:


http://www.syncfusion.com/downloads/support/forum/108785/ze/PrintPDF1720122163


Kindly let us know if the above scenario meets your requirement.

Regards,
Sathish



DM Don Mason April 18, 2016 06:58 PM UTC

Thank you Sathish
but I am not sure where you got the idea that I am using a Windows Service.

I have a WPF app that presents many documents to my users via a grid.
They are able to select (multiple) documents using a select column checkbox.
I then iterate over the selections and perform a silent print using the PdfViewer to initiate the print process.
(the documents are retrieved over our network and loaded into the viewer as a stream)

My manager would like to see this sent to the printer in a batch job rather than one at a time.
Is this Possible?

Thank You.
Don


SS Sathish Sivakumar Syncfusion Team April 19, 2016 01:06 PM UTC

Hi Don,

Thank you for your update.

We have created new separate incident to follow up with your query regarding “Batch printing the PDF documents using PdfViewer control in WPF”.

Kindly login to the Syncfusion account to know more details about the incident:

https://www.syncfusion.com/account/login     


Please let us know if you need further assistance.


Regards,

Sathish


Loader.
Live Chat Icon For mobile
Up arrow icon