Printing for Web Application

I am trying to print from the client side but with no luck. I have created my file from MemoryStream and then load it using a PdfViewer.

First I tried to PrintDocumentWithSetup() but you can’t do this is for Windows Applications as you will get the error "Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application."

Next I tried to do PrintDocument() but I have the error “No printers are installed.” This is probably correct as the server has no printers installed.

All I want to do is to be able to push it through the browser and initiate a Print on the client side.

How can I achieve this?

Hi Quang,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the details.

I am afraid it is not possible to print the PDF file using the client printer in a web application. Aspose.Pdf for .NET only supports printing on the server printer using PDFViewer.

We are sorry for the inconvenience caused,

Is there no way to print on the client side? Is there an alternative to printing without using the PDF approach? I just want to print a document from a memory stream.

If I save the file on the filesystem, I should be able to force a print on the client side

Hi Quang,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Well, this is not a limitation of Aspose.Pdf for .NET, it is kind of a security restriction for all the web applications due to security reason. I further searched the internet and I am unable to find any good solution as per your requirement. Following is a link with some details on ASP.NET forum which might help you get some information regarding your requirement.

http://forums.asp.net/t/1820335.aspx/1?How+can+i+do+printing+Client+Side+using+c+

Sorry for the inconvenience,