How can I convert images to pdf and Word document in uwp?

て烟熏妆下的殇ゞ 提交于 2019-12-12 05:40:10

问题


I want to develop an app which converts images to MS Word document and pdf file in uwp using C#

Which libraries should I use? uwp doesn't support itextsharp


回答1:


Which libraries should I use?

There is no such lib for now.

For MS Word document, especially the version after 2007, it uses Open-XML-SDK and currently it doesn't support UWP platform.

For PDF, you can try to write the PDF file format yourself, here is a blog you can take a look. This could be a hard work. Or if you don't mind to show the "Print" UI, you can put all your images for example into one Grid and print it and call ShowPrintUIAsync method, in this UI, there is a button you can print to PDF file. For this method, you can refer to the official Printing sample.

My suggestion is that trying to deploy or use an available service online, let the service do this work, and when the work is done, you can simple download the stream and save into files.



来源:https://stackoverflow.com/questions/38118194/how-can-i-convert-images-to-pdf-and-word-document-in-uwp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!