AlohaPDF 0.3.0

dotnet add package AlohaPDF --version 0.3.0
                    
NuGet\Install-Package AlohaPDF -Version 0.3.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AlohaPDF" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AlohaPDF" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="AlohaPDF" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AlohaPDF --version 0.3.0
                    
#r "nuget: AlohaPDF, 0.3.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AlohaPDF@0.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AlohaPDF&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=AlohaPDF&version=0.3.0
                    
Install as a Cake Tool

<div align="center">

🌺 AlohaPDF

Create Beautiful PDFs with Aloha Spirit

Build and Test NuGet Downloads License: MIT .NET 9 codecov

A modern, intuitive PDF generator for .NET MAUI with tropical vibes.
Perfect for cross-platform mobile and desktop applications.

Getting Started β€’ Examples β€’ Docs β€’ Contribute

</div>


✨ Why AlohaPDF?

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

πŸš€ Quick Start

Installation

dotnet add package AlohaPDF

Your First PDF

using 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.

🎯 Key Features

<table> <tr> <td width="50%">

πŸ“„ Rich Content

  • βœ… Sections & Subtitles
  • βœ… Paragraphs with styling
  • βœ… Tables (4 beautiful styles)
  • βœ… Lists (bullet & numbered)
  • βœ… Custom spacing
  • βœ… Lines & dividers

</td> <td width="50%">

🎨 Tropical Design

  • βœ… Coral, ocean, palm colors
  • βœ… Modern typography
  • βœ… Custom fonts support
  • βœ… SVG/PNG/JPG logos
  • βœ… Zebra-striped tables
  • βœ… Rounded corners

</td> </tr> <tr> <td>

πŸ”„ Smart Layout

  • βœ… Auto page breaks
  • βœ… Text wrapping
  • βœ… Repeating headers
  • βœ… Dynamic spacing
  • βœ… Multi-page support
  • βœ… Mobile-optimized

</td> <td>

πŸ’» Developer Joy

  • βœ… Fluent, chainable API
  • βœ… IntelliSense support
  • βœ… XML documentation
  • βœ… Type-safe options
  • βœ… Zero setup
  • βœ… .NET 9 ready

</td> </tr> </table>

πŸ“± Platform Support

Platform Status
🍎 iOS βœ… Fully Supported
πŸ€– Android βœ… Fully Supported
πŸͺŸ Windows βœ… Fully Supported
🍎 macOS βœ… Fully Supported

πŸ’‘ Examples

Tropical Color Tables

// 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);

Custom Fonts

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")
    }
};

Logos

var options = new PdfDocumentOptions
{
    Title = "Company Report",
    HeaderLogo = await FileSystem.OpenAppPackageFileAsync("Images/logo.svg"),
    FooterLogo = await FileSystem.OpenAppPackageFileAsync("Images/logo-gray.svg")
};

🎨 Color Palette

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

πŸ“– Documentation

Core Methods

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

Table Styles

  • Primary - Coral header (warm & inviting)
  • Secondary - Ocean header (professional)
  • Dark - Dark header (elegant)
  • Light - Light header (clean)
  • Minimal - Bottom border only

🏝️ Real-World Examples

Check out /samples for complete examples:

  • Sales Report - Professional business reports
  • Invoice - Beautiful invoices
  • Meeting Notes - Structured documents
  • Product Catalog - Multi-column layouts

🀝 Contributing

Aloha! We welcome contributions with open arms! πŸ€—

  1. πŸ› Report bugs - Help us improve
  2. πŸ’‘ Suggest features - Share your ideas
  3. πŸ“ Improve docs - Make it easier for others
  4. πŸ”§ Submit PRs - Code with Aloha spirit

See CONTRIBUTING.md for guidelines.

πŸ“„ License

MIT License - Copyright (c) 2025 Diego BelapatiΓ±o Farias

πŸ™ Acknowledgments

  • Built with SkiaSharp
  • SVG support by Svg.Skia
  • Inspired by tropical paradise 🏝️

⭐ Show Your Support

If AlohaPDF brings Aloha spirit to your project:

  • ⭐ Star this repository
  • 🐦 Share on social media
  • πŸ“ Write about it
  • πŸ’¬ Spread the Aloha!

<div align="center">

Made with 🌺 Aloha Spirit by Diego Belapatiño Farias

Create PDFs with joy, not frustration 😊

Report Bug β€’ Request Feature β€’ Say Aloha

</div>

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0 81 5/4/2026
0.2.2-alpha 104 2/19/2026
0.2.0-alpha 100 2/19/2026

🌺 v0.3.0 - New Components Release

✨ New in this version:
- AddPageBreak() β€” force a new page at any point
- AddCallout(text, CalloutType) β€” Info/Success/Warning/Error alert boxes with colored accent bar
- AddImage(stream, width, height, ImageAlignment) β€” embed PNG, JPG or SVG images with Left/Center/Right alignment
- AddTable() overload with TableOptions config object, including custom ColumnWidthPercents
- AddParagraph() overload with ParagraphOptions config object
- Internal architecture cleanup and legal-clean rewrite of text wrapping and logo rendering

Features:
- Fluent API for PDF generation
- Sections, paragraphs, tables, lists, images, callouts, page breaks
- Tropical-themed styling with PdfColors, PdfLayout, PdfTypography
- Multiple page sizes (A3, A4, A5, Letter, Legal, B4, B5, Executive, Tabloid)
- Portrait and Landscape orientations
- Cross-platform support (.NET 9)
- SkiaSharp-based rendering, MIT license

📝 Feedback: https://github.com/diegorenatob/AlohaPDF/issues