Unchained.Pptx.Rendering
0.1.0-rc.4
dotnet add package Unchained.Pptx.Rendering --version 0.1.0-rc.4
NuGet\Install-Package Unchained.Pptx.Rendering -Version 0.1.0-rc.4
<PackageReference Include="Unchained.Pptx.Rendering" Version="0.1.0-rc.4" />
<PackageVersion Include="Unchained.Pptx.Rendering" Version="0.1.0-rc.4" />
<PackageReference Include="Unchained.Pptx.Rendering" />
paket add Unchained.Pptx.Rendering --version 0.1.0-rc.4
#r "nuget: Unchained.Pptx.Rendering, 0.1.0-rc.4"
#:package Unchained.Pptx.Rendering@0.1.0-rc.4
#addin nuget:?package=Unchained.Pptx.Rendering&version=0.1.0-rc.4&prerelease
#tool nuget:?package=Unchained.Pptx.Rendering&version=0.1.0-rc.4&prerelease
Unchained.Pptx.Rendering
Slide rasterization for Unchained.Pptx. Renders PPTX slides to PNG (or other image formats) using FreeType2 for font rasterization and HarfBuzz for text shaping.
Installation
<PackageReference Include="Unchained.Pptx.Rendering" />
The FreeType2 native library is supplied automatically — by the FreeTypeSharp package on
Windows, macOS, and linux-x64, and by Unchained.Drawing.Runtimes on linux-arm64. No
manual fetch step is needed to consume the package.
Building the repo from source on linux-arm64 is the one case that needs a fetch (the binary is not committed):
# linux-arm64 host only — every other platform is a no-op
bash scripts/FetchNatives/fetch-natives.sh --rid linux-arm64
Quick start
using Unchained.Pptx.Engine;
using Unchained.Pptx.Rendering;
using Unchained.Pptx.Rendering.Engine;
var processor = new PresentationProcessor();
var doc = await processor.LoadAsync("presentation.pptx");
// Render all slides at 1920×1080 (default)
var images = await SlideRenderer.RenderAllAsync(doc);
// Save each slide as PNG
for (var i = 0; i < images.Length; i++)
await images[i].SaveAsync($"slide{i + 1}.png");
// Render a single slide at custom resolution
var thumbnail = await SlideRenderer.RenderAsync(
doc.Slides[0],
doc.SlideSize,
new RenderOptions { WidthPx = 640, HeightPx = 360 },
doc.Media); // pass Media so embedded fonts are used
Pass
document.MediatoRenderAsync(it is passed automatically byRenderAllAsync) so embedded fonts resolve. Without it, custom typefaces fall back to bundled substitutes.
Fonts
Runs are rendered with FreeType2 + HarfBuzz. Font resolution order per run:
- Embedded font — if the presentation embeds the run's typeface
(
<p:embeddedFontLst>→/ppt/fonts/*.fntdata), the real font bytes are used, matched by typeface and style (regular/bold/italic/bold-italic). - Bundled substitute — Standard-14 names map to DejaVu; everything else falls back to NotoSans-Regular.
Glyphs are blitted via BlitGlyphFromFace, which reads the FreeType glyph slot through
FreeTypeSharp's typed structs. Marshaling is correct on every platform — including
Windows x64, where the previous SharpFont binding used a wrong Face.Glyph offset and
yielded empty bitmaps (the old cause of missing text in slide renders).
Output formats
RenderOptions.Format selects the encoder:
| Format | Status | Notes |
|---|---|---|
RenderImageFormat.Png (default) |
Supported | Lossless, recommended |
RenderImageFormat.Bmp |
Supported | Uncompressed 24-bit, large files |
RenderImageFormat.Jpeg |
Not implemented | Throws NotSupportedException |
The returned PptxImage.Format always matches the bytes in PptxImage.Data.
Embedded images
Embedded PNG pictures (p:pic) are decoded (BCL-only inflate + unfiltering) and
blitted into their shape rectangle. Other formats — JPEG, EMF/WMF, SVG, WDP — are
not yet decoded; those picture regions are left transparent. Text, shapes, and solid
fills always render.
Dependencies
| Library | License | Purpose |
|---|---|---|
| HarfBuzzSharp | MIT | Unicode text shaping |
| FreeTypeSharp | MIT | FreeType2 managed bindings + bundled native binaries |
| FreeType2 (native) | FTL (BSD-like) | Font rasterization |
Bundled fonts: DejaVu (Bitstream Vera / SIL OFL) · NotoSans-Regular (SIL OFL)
Targets
net8.0 · net9.0 · net10.0
License
MIT — no commercial restrictions.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. 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 is compatible. 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. |
-
net10.0
- CoreJ2K (>= 2.3.0.81)
- DocumentFormat.OpenXml (>= 3.5.1)
- FreeTypeSharp (>= 3.1.0)
- HarfBuzzSharp (>= 8.3.1.5)
- HarfBuzzSharp.NativeAssets.Linux (>= 8.3.1.5)
- HarfBuzzSharp.NativeAssets.macOS (>= 8.3.1.5)
- HarfBuzzSharp.NativeAssets.Win32 (>= 8.3.1.5)
- JBig2Decoder.NETStandard (>= 1.5.2)
- JpegLibrary (>= 0.4.32)
- Unchained.Drawing.Text (>= 0.1.0-rc.4)
- Unchained.Pptx (>= 0.1.0-rc.4)
-
net8.0
- CoreJ2K (>= 2.3.0.81)
- DocumentFormat.OpenXml (>= 3.5.1)
- FreeTypeSharp (>= 3.1.0)
- HarfBuzzSharp (>= 8.3.1.5)
- HarfBuzzSharp.NativeAssets.Linux (>= 8.3.1.5)
- HarfBuzzSharp.NativeAssets.macOS (>= 8.3.1.5)
- HarfBuzzSharp.NativeAssets.Win32 (>= 8.3.1.5)
- JBig2Decoder.NETStandard (>= 1.5.2)
- JpegLibrary (>= 0.4.32)
- Unchained.Drawing.Text (>= 0.1.0-rc.4)
- Unchained.Pptx (>= 0.1.0-rc.4)
-
net9.0
- CoreJ2K (>= 2.3.0.81)
- DocumentFormat.OpenXml (>= 3.5.1)
- FreeTypeSharp (>= 3.1.0)
- HarfBuzzSharp (>= 8.3.1.5)
- HarfBuzzSharp.NativeAssets.Linux (>= 8.3.1.5)
- HarfBuzzSharp.NativeAssets.macOS (>= 8.3.1.5)
- HarfBuzzSharp.NativeAssets.Win32 (>= 8.3.1.5)
- JBig2Decoder.NETStandard (>= 1.5.2)
- JpegLibrary (>= 0.4.32)
- Unchained.Drawing.Text (>= 0.1.0-rc.4)
- Unchained.Pptx (>= 0.1.0-rc.4)
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.1.0-rc.4 | 39 | 6/20/2026 |