Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. Any suggestions?

like image 599
Teysz Avatar asked Jan 05 '16 14:01

Teysz


3 Answers

Try Syncfusion, they have library for PDF creation, they even have a PDF Viewer control for UWP.

http://www.syncfusion.com/products/uwp

like image 133
Ask Too Much Avatar answered Nov 16 '22 23:11

Ask Too Much


There is also XFINIUM.PDF, it supports UWP.
http://xfiniumpdf.com/xfinium-pdf-crossplatform/xfinium-pdf-overview.html

Disclaimer: I work for the company that develops this product.

like image 27
Mihai Iancu Avatar answered Nov 17 '22 01:11

Mihai Iancu


you have to use FileSavePicker(); to save the PDF document to disk once you saved in to the memory stream.

PdfDocument document=new PdfDocument();
PdfPage page=document.Pages.Add();
document.Save(stream);
document.Close(true);

Note: these API's from syncfusion PDF Library.

Disclaimer: I work for syncfusion

like image 1
Praveen Avatar answered Nov 16 '22 23:11

Praveen