A implementation of pdfjs for android wrapped into a nuget so you can just install and use it. Have fun :).
Based on https://github.com/jfversluis/MauiPdfJsViewerSample
Be sure to meet pdf.js Apache license details in your app https://github.com/mozilla/pdf.js
Usage: XAML
<pdfjs:PdfJsWebView x:Name="pdfJsViewer" />
C#
private void Button_Clicked_FromAssets(object sender, EventArgs e)
{
pdfJsViewer.LoadPdfFromMauiAssets("sample.pdf");
}
private async void Button_Clicked_FromStream(object sender, EventArgs e)
{
using var stream = await FileSystem.OpenAppPackageFileAsync("sample.pdf");
pdfJsViewer.LoadPdfFromSteam(stream);
}
private async void Button_Clicked_FromPath(object sender, EventArgs e)
{
string fileName = $"{Guid.NewGuid():N}.pdf";
string filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), fileName);
using var pdfStream = await FileSystem.OpenAppPackageFileAsync("sample.pdf");
using (FileStream file = new FileStream(filePath, FileMode.Create, FileAccess.Write))
pdfStream.CopyTo(file);
pdfJsViewer.LoadPdfFromPath(filePath);
}