[英]How to create a PDF file with UWP C#?
I want to create a PDF file using C# for UWP, but the iTextSharp doesn't work for UWP, and I can't find any other 3rd party library that could create PDF files for UWP.我想使用 C# 为 UWP 创建 PDF 文件,但 iTextSharp 不适用于 UWP,而且我找不到任何其他可以为 UWP 创建 PDF 文件的第三方库。 Any suggestions?
有什么建议么?
Try Syncfusion, they have library for PDF creation, they even have a PDF Viewer control for UWP.试试 Syncfusion,他们有用于创建 PDF 的库,他们甚至有一个用于 UWP 的 PDF 查看器控件。
http://www.syncfusion.com/products/uwp http://www.syncfusion.com/products/uwp
There is also XFINIUM.PDF, it supports UWP.还有XFINIUM.PDF,它支持UWP。
http://xfiniumpdf.com/xfinium-pdf-crossplatform/xfinium-pdf-overview.html http://xfiniumpdf.com/xfinium-pdf-crossplatform/xfinium-pdf-overview.html
Disclaimer: I work for the company that develops this product.免责声明:我为开发该产品的公司工作。
you have to use FileSavePicker();
你必须使用
FileSavePicker();
to save the PDF document to disk once you saved in to the memory stream.保存到内存流后,将 PDF 文档保存到磁盘。
PdfDocument document=new PdfDocument();
PdfPage page=document.Pages.Add();
document.Save(stream);
document.Close(true);
Note: these API's from syncfusion PDF Library.注意:这些 API 来自 syncfusion PDF 库。
Disclaimer: I work for syncfusion免责声明:我为 syncfusion 工作
You must try to Aspose PDF. 您必须尝试Aspose PDF。
I used this and very successfully. 我使用了它,并且非常成功。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.