在我的应用程序中,我需要能够创建PDF报告,包括页眉/页脚,图片,文本等 . 现在我发现了一个librabry migradoc,我无法弄清楚atm . 如何打印/显示用户按“创建”按钮时创建的文件?
在PdfSharp中我可以说 document.Save(Url) 和 Process.Start(url) ,但我不能对Migradoc做同样的事情 .
document.Save(Url)
Process.Start(url)
MigraDoc使用PDFsharp . 您只需调用Save and Start,就像使用PDFsharp一样:
// Save the document... const string filename = "HelloWorld.pdf"; pdfRenderer.PdfDocument.Save(filename); // ...and start a viewer. Process.Start(filename);
来自MigraDoc附带的HelloWorld示例的代码片段 . 也可以看看:http://www.pdfsharp.net/wiki/MigraDocHelloWorld-sample.ashx
1 回答
MigraDoc使用PDFsharp . 您只需调用Save and Start,就像使用PDFsharp一样:
来自MigraDoc附带的HelloWorld示例的代码片段 . 也可以看看:
http://www.pdfsharp.net/wiki/MigraDocHelloWorld-sample.ashx