问题
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