Use IronPDF on Android with MAUI
IronPDF is equipped to run as a remote service, offering improved convenience, performance, and deployability. Many customers are already using this technology to run IronPDF in a Docker container alongside their main applications.
The IronPdf.Server.Azure
NuGet package now enables running IronPDF in the cloud, making it easy to use IronPDF across any platform, including mobile!
For your convenience, you can clone a GitHub repository on the right side.
Get started with IronPDF
<!-- Sample XML to start using the IronPDF library. Replace the path and class names as appropriate for your setup and ensure trial license setup -->
<Project>
<ItemGroup>
<PackageReference Include="IronPdf" Version="2023.*" />
</ItemGroup>
</Project>
<!-- Sample XML to start using the IronPDF library. Replace the path and class names as appropriate for your setup and ensure trial license setup -->
<Project>
<ItemGroup>
<PackageReference Include="IronPdf" Version="2023.*" />
</ItemGroup>
</Project>
How to use IronPDF on MAUI Android
- Download the C# library to render PDF files on Android
- Configure the Azure App Service
- Configure the Android MAUI client
- Generate and edit PDFs on Android with ease
- Download the project for a fast start
Azure App Service Host
- Create a new Azure BLOB Storage Container.
- Create a new Azure App Service and App Service Plan. We suggest Basic B2 plan or greater, but Free F1 should be sufficient to get started.
- Navigate to the Settings/Configuration section of your Web app and set the following values:
BLOB_STORAGE_CONNECTION
: You can configure a connection string according to the format outlined by Microsoft.BLOB_STORAGE_CONTAINER
: This is just the name of the container within the storage account.HTTP20_ONLY_PORT
: Must be set to 80.
- Using Visual Studio, open the example Azure App Service Linux Container app,
IronPdf.Android.Server.csproj
. - Create a new publish profile which targets the Azure App Service you created in step 2.
- Publish your app!
- After several minutes, you should be able to verify your app is successfully published by navigating to the URL in a browser, which will print a simple debug string.
Android MAUI Client
- Using Visual Studio, open the example MAUI Android application,
IronPdf.Android.Client.csproj
. - Within
MainPage.xaml.cs
, set your license key or remove this line to generate watermarked documents. - Within
MainPage.xaml.cs
, change theHost = "https://YOUR-APP-SERVICE.azurewebsites.net/"
line to your Azure App Service which is hosting IronPdf. - Run the demo on an Android device which supports API 21.0 or higher.
// MainPage.xaml.cs Sample Code
using System; // Importing necessary namespaces
namespace IronPdf.Maui
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
// Change this to your Azure App Service URL
var pdfServiceUrl = "https://YOUR-APP-SERVICE.azurewebsites.net/";
// Your PDF generation and manipulation logic here
}
}
}
// MainPage.xaml.cs Sample Code
using System; // Importing necessary namespaces
namespace IronPdf.Maui
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
// Change this to your Azure App Service URL
var pdfServiceUrl = "https://YOUR-APP-SERVICE.azurewebsites.net/";
// Your PDF generation and manipulation logic here
}
}
}
' MainPage.xaml.cs Sample Code
Imports System ' Importing necessary namespaces
Namespace IronPdf.Maui
Partial Public Class MainPage
Inherits ContentPage
Public Sub New()
InitializeComponent()
' Change this to your Azure App Service URL
Dim pdfServiceUrl = "https://YOUR-APP-SERVICE.azurewebsites.net/"
' Your PDF generation and manipulation logic here
End Sub
End Class
End Namespace
NOTE: Depending on your plan settings, the first render may take a while as your Azure App Service is started for the first time.
Frequently Asked Questions
What is the purpose of the library for PDF generation and manipulation?
IronPDF is a library that enables PDF generation and manipulation across various platforms, including Android, by using C#.
Can the library be used on Android devices?
Yes, IronPDF can be used on Android devices, especially with MAUI, to render and edit PDF files.
How do I get started with the library on Android?
To get started with IronPDF on Android, download the C# library from NuGet, configure your Azure App Service, and set up your Android MAUI client.
What is the core engine that powers the PDF generation library?
IronPdfEngine is the core engine that powers IronPDF, enhancing its PDF generation and manipulation capabilities.
What Azure App Service plan is recommended for hosting the library?
It is suggested to use at least the Basic B2 plan, although the Free F1 plan should suffice for getting started.
How can I configure the Android MAUI client for the library?
Open the example MAUI Android application in Visual Studio, set your license key, update the Azure App Service URL, and run the demo on a compatible Android device.
What are the system requirements for running the library on Android?
IronPDF requires an Android device that supports API 21.0 or higher to run the MAUI application.
Is it possible to run the library in a Docker container?
Yes, IronPDF can be run as a remote service in a Docker container, providing enhanced convenience and deployability.
Where can I find the GitHub repository for the library?
You can clone the IronPDF GitHub repository from the link provided on the official website.
What should I do if the initial render on Azure takes a long time?
The first render might take longer due to the Azure App Service being started for the first time, which is normal depending on your plan settings.