Question

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 document.Save(Url) and Process.Start(url), but I can't do the same with Migradoc.

Was it helpful?

Solution

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";
pdfRenderer.PdfDocument.Save(filename);
// ...and start a viewer.
Process.Start(filename);

Code snippet from the HelloWorld sample that comes with MigraDoc. See also:
http://www.pdfsharp.net/wiki/MigraDocHelloWorld-sample.ashx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top