SlideGenerator.Framework
1.0.0
See the version list below for details.
dotnet add package SlideGenerator.Framework --version 1.0.0
NuGet\Install-Package SlideGenerator.Framework -Version 1.0.0
<PackageReference Include="SlideGenerator.Framework" Version="1.0.0" />
<PackageVersion Include="SlideGenerator.Framework" Version="1.0.0" />
<PackageReference Include="SlideGenerator.Framework" />
paket add SlideGenerator.Framework --version 1.0.0
#r "nuget: SlideGenerator.Framework, 1.0.0"
#:package SlideGenerator.Framework@1.0.0
#addin nuget:?package=SlideGenerator.Framework&version=1.0.0
#tool nuget:?package=SlideGenerator.Framework&version=1.0.0
SlideGenerator.Framework
A .NET framework for generating PowerPoint files from Excel data.
Docs:
Quick links:
- Overview: docs/en/overview.md
- Usage: docs/en/usage.md
Modules
- Cloud: resolve supported cloud URLs to direct download links.
- Sheet: workbook and worksheet access for Excel/CSV data.
- Slide: template loading, slide cloning, text replacement, image replacement.
- Image: ROI detection, cropping, and resizing helpers.
Prerequisites
EmguCV Runtime
This framework relies on EmguCV for advanced image processing (ROI detection, face detection). You must ensure that the appropriate native runtime package for your target architecture is installed in your final application project:
- Windows (x64):
Emgu.CV.runtime.windows - Linux (x64):
Emgu.CV.runtime.ubuntu-x64(or other corresponding Linux runtimes)
For more details, see Emgu.CV Installation.
Ensure the runtime version matches the Emgu.CV version used in the framework (currently 4.12.0.5764). Without the proper runtime, image processing features will fail with DllNotFoundException or TypeInitializationException.
You can configure your .csproj to automatically include the correct runtime based on the target RuntimeIdentifier:
<ItemGroup Condition="'$(RuntimeIdentifier)'=='win-x64'">
<PackageReference Include="Emgu.CV.runtime.windows" Version="4.12.0.5764" />
</ItemGroup>
<ItemGroup Condition="'$(RuntimeIdentifier)'=='linux-x64'">
<PackageReference Include="Emgu.CV.runtime.ubuntu-x64" Version="4.12.0.5764" />
</ItemGroup>
<ItemGroup Condition="'$(RuntimeIdentifier)'=='linux-arm'">
<PackageReference Include="Emgu.CV.runtime.debian-arm" Version="4.12.0.5764" />
</ItemGroup>
<ItemGroup Condition="'$(RuntimeIdentifier)'=='linux-arm64'">
<PackageReference Include="Emgu.CV.runtime.debian-arm64" Version="4.12.0.5764" />
</ItemGroup>
Note: macOS is not supported in these script because the Emgu.CV runtime does not support it directly out of the box in this context. For more details, see Emgu.CV MacOS installation.
Cloud
Key type:
SlideGenerator.Framework.Cloud.CloudUrlResolver
Usage:
var uri = await CloudUrlResolver.ResolveLinkAsync("https://drive.google.com/file/d/.../view");
Supported services:
- Google Drive
- OneDrive
- Google Photos
Sheet
Key types:
SlideGenerator.Framework.Sheet.Models.WorkbookSlideGenerator.Framework.Sheet.Contracts.IWorksheet
Usage:
using var workbook = new Workbook("data.xlsx");
var sheets = workbook.GetWorksheetsInfo();
var firstSheet = workbook.Worksheets["Sheet1"];
var row = firstSheet.GetRow(1);
Notes:
WorkbookisIDisposable. Dispose it when done.
Slide
Key types:
SlideGenerator.Framework.Slide.Models.TemplatePresentationSlideGenerator.Framework.Slide.Models.WorkingPresentationSlideGenerator.Framework.Slide.TextReplacerSlideGenerator.Framework.Slide.ImageReplacer
Usage:
using var template = new TemplatePresentation("template.pptx");
var working = template.SaveAs("output.pptx");
var slidePart = template.GetSlidePart();
await TextReplacer.ReplaceAsync(slidePart, new Dictionary<string, string>
{
["{{Name}}"] = "Alice"
});
Notes:
- Template presentations must contain exactly one slide; the template index is fixed at 1.
- When the template has more than one slide,
NotOnlyOneSlidePresentationis thrown. - Use
GetAllPreviewImageShapes()to discover image shape ids and previews. - Use
ImageReplacer.ReplaceImage(...)for image placeholders.
Image
Key types:
SlideGenerator.Framework.Image.ImageProcessorSlideGenerator.Framework.Image.Configs.RoiOptionsSlideGenerator.Framework.Image.Enums.RoiTypeSlideGenerator.Framework.Image.Enums.CropType
Usage:
var processor = new ImageProcessor(new RoiOptions());
var selector = processor.GetRoiSelector(RoiType.Center);
await ImageProcessor.CropToRoiAsync(imageData, targetSize, selector, CropType.Crop);
Notes:
- Face model init is async and serialized inside
ImageProcessor. - Exceptions are thrown for unsupported or invalid inputs; callers should catch and handle.
Contributors:
- Main Developer: @thnhmai06
- Cloud Logic: @Hair-Nguyeenx
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- ClosedXML (>= 0.105.0)
- DocumentFormat.OpenXml (>= 3.3.0)
- Emgu.CV (>= 4.12.0.5764)
- Emgu.CV.Models (>= 4.12.0.5764)
- FreeSpire.Presentation (>= 9.3.0)
- Magick.NET-Q8-AnyCPU (>= 14.10.0)
- Stubble.Core (>= 1.10.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.