you need to use FileSavePicker(); to save the PDF document to disk after saving to the memory stream.
PdfDocument document=new PdfDocument(); PdfPage page=document.Pages.Add(); document.Save(stream); document.Close(true);
Note: these APIs are from the sync pdf library.
Relations Praveen
source share