|108785||May 13,2013 07:42 AM UTC||Apr 19,2016 01:06 PM UTC||WinForms||7|
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.
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
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.
"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
//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:
We have also attached the sample for batch print the exported images of the PDF documents manually from the below link:
Kindly let us know if the above scenario meets your requirement.
Please let us know if you need further assistance.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.