![]() Intent intent = new Intent(Intent.ActionView) String extension = MimeTypeMap.GetFileExtensionFromUrl((file).ToString()) If (file.Exists() & contentType != "application/html") Java.IO.File file = new Java.IO.File(myDir, fileName) įileOutputStream outs = new FileOutputStream(file) Java.IO.File myDir = new Java.IO.File(root + "/PDFFiles") ![]() If (Android.OS.Environment.IsExternalStorageEmulated) ![]() If (ContextCompat.CheckSelfPermission(Forms.Context, ) != Permission.Granted)Īctivit圜ompat.RequestPermissions((Activity)Forms.Context, new String, 1) Public async Task SaveAndView(string fileName, String contentType, MemoryStream stream, PDFOpenContext context) Public class PDFSaveAndOpen : IPDFSaveAndOpen Task SaveAndView(string fileName, String contentType, MemoryStream stream, PDFOpenContext context) Companies, whom you can download NuGet Packages to create PDF Document:įirst thing we need to do, that create an interface in the StandardLibrary. But if you want to open an exists document, just read this blog post cointinue :D. We need to create a PDF Document first and than save it. There are many companies, who deal with generationg PDF Document in Xamarin.Forms. How can it possible? Throught DependencyService. It could be a real situation that your app need to save or open a pdf file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |