Can I print dynamically generated PDF using PDFNet SDK (in ASP.NET)?

I need to be able to open, print and close the PDF automatically after
it has been generated. I would like to be able to do this directly in
the code itself.


Yes, using PDFNet SDK ( you can print PDF
(directly after generating it) within an ASP.NET application. There is
no need to use JavaScript or to rely on Acrobat or any third party

As a starting point, you may want to take a look at PDFPrint sample

PDFNet also comes with two PDF rasterizers so there are couple of ways
you could implement printing with various pros and cons.

To switch between different rasterizers you may want to comment out
the following line:
  // pdfdraw.SetRasterizerType(PDFRasterizer.Type.e_BuiltIn);

Also PrintPage method illustrates couple of ways you could print the
page (i.e. either directly or indirectly by rasterizing first to

For an example of how to dynamically generate PDF, please see
ElementBuilder sample project