-
-
Save nekszer/7c662b6de33e93e5a75c0b7a516a30ed to your computer and use it in GitHub Desktop.
Método para guardar el pdf
This file contains 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