Printing from ASP .NET Application - No supported options built into Aspose PDF library :(

Support,

I have purchased your product for printing PDFs to printer.

However you use System.Drawing.Printing namespace to perform this function.

This is not supported in WIndows Service and ASP .NET applications as detailed here:

http://msdn.microsoft.com/en-us/library/system.drawing.printing(v=vs.110).aspx

I see other vendors such as FoxIT PDF do not use that namespace and therefore can be used in ASP .NET environments safely.

Also, other companys have developed this functionality using winspool API calls from within .NET.

How can I safely print from Aspose PDF in ASP .NET? There does not seem to be any way to do it.

I see one post here:

PDFNEWNET-32812 Printing PDFs by a Windows Service

That says you must first convert PDF to XPS, then use XPS print API. Which means we must also purchase Aspose Documents just to print.

Hi,


Thanks for contacting support.

Aspose.Pdf for .NET can be used in any application based on .NET Framework, but printing feature might not work in ASP.NET. However as a workaround, you may consider converting PDF file to Image/HTML/XPS format and then perform the printing.

We are sorry for this inconvenience.

How will converting a PDF to Image/HTML/XPS solve this problem?


Can you please provide a code sample that performs printing from a .NET application that does not rely on the System.Drawing.Printing namespace?

Thank you.

ARRT:
How will converting a PDF to Image/HTML/XPS solve this problem?
Hi,

Please visit the following links for required information on


ARRT:
Can you please provide a code sample that performs printing from a .NET application that does not rely on the System.Drawing.Printing namespace?
In order to have printing solution, we will have to implement your own solution. Meanwhile I will also check with my fellows in Aspose.Words team and see if they have any solution for printing Word files from ASP.NET application ( we can convert PDF files to Word format using Aspose.Pdf for .NET).

Hi,


As a workaround, please try printing a PDF documents via Windows service with collaboration of Aspose.Pdf and Aspose.Words. First convert PDF document to XPS using Aspose.Pdf for .NET (as specified below) and later print that XPS with Aspose.Words. Please check following details.<o:p></o:p>


Convert PDF to XPS:<o:p></o:p>

Document doc = new Document(“1.pdf”);<o:p></o:p>

doc.Save(“1.xps”, new XpsSaveOptions());<o:p></o:p>

Print XPS using Aspose.Words:<o:p></o:p>



In the event of any further query, please feel free to contact.