Skip to content

Oaz/AvaloniaUI.PrintToPDF

Repository files navigation

AvaloniaUI.PrintToPDF

This is an experimental lib to create PDF documents from Avalonia UI visuals.

The PDF files are generated by the Skia PDF backend.

Demo

The demo app generates PDF files using some pages from the Avalonia Control Catalog.

Here is a sample PDF file.

Usage

One of the simplest code is a full screenshot (in vector graphics) of a desktop app main window:

AvaloniaUI.PrintToPDF.Print.ToFile(
  "app_screenshot.pdf",
   (Application.Current.ApplicationLifetime as IClassicDesktopStyleApplicationLifetime).MainWindow
);

About

Create PDF documents from Avalonia UI visuals

Resources

License

Stars

Watchers

Forks

Packages

No packages published