/Save
Created
May 17, 2020 03:16
Método para guardar el pdf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async void Save_Command(object obj) | |
{ | |
var pdf = PDFManager.GeneratePDFFromView(Page.Content); // aqui le paso la vista que quiero que vuelva pdf | |
var basepath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); | |
var pdfpath = Path.Combine(basepath, $"/mypdf.pdf"); | |
pdf.Save(pdfpath); | |
try | |
{ | |
await Share.RequestAsync(new ShareFileRequest(new ShareFile(pdfpath))); | |
} | |
catch | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment