![]() |
VOOZH | about |
dotnet add package Unchained.Pptx.Rendering --version 0.1.0
NuGet\Install-Package Unchained.Pptx.Rendering -Version 0.1.0
<PackageReference Include="Unchained.Pptx.Rendering" Version="0.1.0" />
<PackageVersion Include="Unchained.Pptx.Rendering" Version="0.1.0" />Directory.Packages.props
<PackageReference Include="Unchained.Pptx.Rendering" />Project file
paket add Unchained.Pptx.Rendering --version 0.1.0
#r "nuget: Unchained.Pptx.Rendering, 0.1.0"
#:package Unchained.Pptx.Rendering@0.1.0
#addin nuget:?package=Unchained.Pptx.Rendering&version=0.1.0Install as a Cake Addin
#tool nuget:?package=Unchained.Pptx.Rendering&version=0.1.0Install as a Cake Tool
Slide rasterization for Unchained.Pptx. Renders PPTX slides to PNG (or other image formats) using FreeType2 for font rasterization and HarfBuzz for text shaping.
<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
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.
Runs are rendered with FreeType2 + HarfBuzz. Font resolution order per run:
<p:embeddedFontLst> โ /ppt/fonts/*.fntdata), the real font bytes are used,
matched by typeface and style (regular/bold/italic/bold-italic).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).
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 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.
| 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)
net8.0 ยท net9.0 ยท net10.0
MIT โ no commercial restrictions.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 46 | 6/25/2026 |
| 0.1.0-rc.4 | 56 | 6/20/2026 |