A sample .NET MAUI project which uses iText pdfHtml.
On button click it converts HTML (downloaded from hardcoded URL) to PDF. The PDF file is located in the app's folder.
- .NET 10+
- Installation can be checked by running
dotnet --info.
- Installation can be checked by running
- Installed .NET MAUI
- Run
dotnet workload install mauito install MAUI. - Verify that MAUI was installed by running
dotnet workload list.
- Run
- Rider or VisualStudio 2022+.
- (Mac only) Xcode 26.2+
This README was written based on workflow on macOS 26 using Rider.
To build App for iOS simulator
dotnet build ./itext-dotnet-maui-example.sln /property:GenerateFullPaths=true -p:Configuration=Release -f net10.0-ios -p:iOSTarget=Simulator
dotnet build ./itext-dotnet-maui-example.sln /property:GenerateFullPaths=true -p:Configuration=Release -f net10.0-ios -p:iOSTarget=Simulator -t:Run -p:_DeviceName=:v2:udid=<DEVICE_ID>where <DEVICE_ID> is the device ID to run the App on. Put your device ID here instead.
To build App for iOS device Update itext-dotnet-maui-example.csproj with your codesign key and provision profile. Also ensure that ApplicationId in .csproj file corresponds to your provisioning profile app id. Then run
dotnet build ./itext-dotnet-maui-example.sln /property:GenerateFullPaths=true -p:Configuration=Release -f net10.0-ios -p:iOSTarget=Device
dotnet publish ./itext-dotnet-maui-example.csproj -f net10.0-ios -c Release -p:ArchiveOnBuild=true -p:iOSTarget=Device -p:CodesignKey="<CODESIGN_KEY>" -p:CodesignProvision="<CODESIGN_PROVISION>"where <CODESIGN_KEY> and <CODESIGN_PROVISION> are codesign key and provision profile. Put your codesign key and provision profile here instead.
To create an iOS App one needs
- Enroll to Apple developer program.
- Follow instructions on how to create development certificate, add devices, create provisioning profile.
- If App is not installed on your test device: update tools/SDKs to the latest versions if your Mac allows, google, build, restart, repeat until solved.
