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))); | |
} |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage ... | |
BackgroundColor="#eeeeee" | |
Title="PDF Checklist"> | |
<ContentPage.ToolbarItems> | |
<ToolbarItem Text="Exportar a pdf" Command="{Binding Save}" /> | |
</ContentPage.ToolbarItems> | |
<ContentPage.Content> | |
<ScrollView> | |
<Grid> |