Hello,
You can use webview to show the pdf file.
Firstly, you can copy pdf file to Resources\Raw\
path and make sure pdf file's Build action is MauiAsset
Then, you can use the following code to show your pdf file.
<?xml version="1.0" encoding="utf-8" ?>
<toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="MauiShowPDF.SimplePopup"
>
<Grid >
<WebView Grid.Row="1" HorizontalOptions="Fill" VerticalOptions="Fill" Source="maui.pdf" />
</Grid>
</toolkit:Popup>
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.