A modern, intuitive PDF generator for .NET MAUI with tropical vibes.
Perfect for cross-platform mobile and desktop applications.
Getting Started β’ Examples β’ Docs β’ Contribute
The Aloha Spirit - Creating PDFs should be welcoming, simple, and joyful. AlohaPDF brings that spirit to .NET MAUI.
- πΊ Simple & Intuitive - Fluent API that feels natural
- π¨ Beautiful by Default - Tropical color palette inspired design
- π± Mobile-First - Built specifically for .NET MAUI
- β‘ Lightning Fast - Optimized for mobile performance
- π 100% Open Source - MIT licensed, free forever
- π΄ Modern Design - Contemporary styling out of the box
dotnet add package AlohaPDFusing AlohaPDF;
using AlohaPDF.Core;
var pdf = new AlohaPdfDocument();
pdf.Initialize(new PdfDocumentOptions
{
Title = "Welcome to AlohaPDF",
Subtitle = "Creating PDFs with Aloha Spirit",
PageSize = PageSize.A4, // A4, Letter, Legal, A3, A5, Tabloid, Executive, B4, B5
Orientation = PageOrientation.Portrait, // Portrait or Landscape
Info = new DocumentInfo
{
Author = "Your Name",
CreatedDate = DateTime.Now
// Displays as simple one-line: "Your Name β’ Created on Feb 11, 2025"
}
});
pdf
.AddSection("Aloha!")
.AddParagraph("Welcome to the easiest way to create PDFs in .NET MAUI!")
.AddTable(
headers: new[] { "Feature", "Status" },
rows: new[]
{
new[] { "Beautiful Design", "β" },
new[] { "Easy to Use", "β" },
new[] { "Open Source", "β" }
},
headerStyle: TableHeaderStyle.Primary
);
pdf.Generate("aloha.pdf");That's it! πΊ You just created a beautiful PDF.
|
|
|
|
| Platform | Status |
|---|---|
| π iOS | β Fully Supported |
| π€ Android | β Fully Supported |
| πͺ Windows | β Fully Supported |
| π macOS | β Fully Supported |
// Coral primary header
pdf.AddTable(headers, rows, headerStyle: TableHeaderStyle.Primary);
// Ocean blue accent
pdf.AddTable(headers, rows, headerStyle: TableHeaderStyle.Secondary);
// Dark professional
pdf.AddTable(headers, rows, headerStyle: TableHeaderStyle.Dark);
// Clean minimal
pdf.AddTable(headers, rows, headerStyle: TableHeaderStyle.Minimal);var options = new PdfDocumentOptions
{
Title = "Custom Font Report",
Fonts = new FontOptions
{
Regular = await FileSystem.OpenAppPackageFileAsync("Fonts/Inter-Regular.ttf"),
Bold = await FileSystem.OpenAppPackageFileAsync("Fonts/Inter-Bold.ttf")
}
};var options = new PdfDocumentOptions
{
Title = "Company Report",
HeaderLogo = await FileSystem.OpenAppPackageFileAsync("Images/logo.svg"),
FooterLogo = await FileSystem.OpenAppPackageFileAsync("Images/logo-gray.svg")
};AlohaPDF uses a tropical-inspired color scheme:
- Primary (Coral):
#FF6B35- Warm and welcoming - Secondary (Ocean):
#00A8CC- Professional and calm - Accent (Palm):
#6BBF59- Fresh and vibrant
| Method | Description |
|---|---|
Initialize(options) |
Set up your PDF |
AddSection(text, pill) |
Add numbered section |
AddSubtitle(text, pill) |
Add subtitle |
AddParagraph(text, ...) |
Add text with wrapping |
AddTable(headers, rows, ...) |
Add data table |
AddList(items, ...) |
Add bullet/numbered list |
Generate(path) |
Create the PDF file |
Primary- Coral header (warm & inviting)Secondary- Ocean header (professional)Dark- Dark header (elegant)Light- Light header (clean)Minimal- Bottom border only
Check out /samples for complete examples:
- Sales Report - Professional business reports
- Invoice - Beautiful invoices
- Meeting Notes - Structured documents
- Product Catalog - Multi-column layouts
Aloha! We welcome contributions with open arms! π€
- π Report bugs - Help us improve
- π‘ Suggest features - Share your ideas
- π Improve docs - Make it easier for others
- π§ Submit PRs - Code with Aloha spirit
See CONTRIBUTING.md for guidelines.
MIT License - Copyright (c) 2025 Diego BelapatiΓ±o Farias
If AlohaPDF brings Aloha spirit to your project:
- β Star this repository
- π¦ Share on social media
- π Write about it
- π¬ Spread the Aloha!
Made with πΊ Aloha Spirit by Diego BelapatiΓ±o Farias
Create PDFs with joy, not frustration π
Report Bug β’ Request Feature β’ Say Aloha