Timsen Timsen - 9 months ago 83
C# Question

Print Migradoc document with MVC 3

In my application ,I need to be able to create a PDF report, with header/footer, pictures, text and so on. Right now I have found a librabry migradoc, and i can't figure out atm. how to print/show the file which is getting created when user push "Create" button?

In PdfSharp I can just say

, but I can't do the same with Migradoc.

Answer Source

MigraDoc uses PDFsharp. You just have to call Save and Start, just like you do with PDFsharp:

// Save the document...
const string filename = "HelloWorld.pdf";
// ...and start a viewer.

Code snippet from the HelloWorld sample that comes with MigraDoc. See also: