I want to write a Windows Service which prints PDFs and I though Spire.PDF is able to do the printing. In the end it comes down to code similar to this:
- Code: Select all
Spire.Pdf.PdfDocument doc = new PdfDocument()
doc.LoadFromFile(document);
doc.PrinterName = printerName;
Spire.PDF integrates with System.Drawing.Printing. I found this warning on the MSDN page about the System.Drawing.Printing namespace:
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.
This tells me not to use System.Drawing.Printing in the context of a Windows Service. Hence this would also role Spire.PDF out. Is this correct?
In your feature list says that Spire.PDF cab be used in ASP.NET applications. This contradicts with the MSDN warning. How is this possible?
In the case Spire.PDF be used in the context of an ASP.NET application, does this also apply to Windows Service applications?
Best regards,
Olaf