Art.DocumentUtilities.Images
3.0.0
dotnet add package Art.DocumentUtilities.Images --version 3.0.0
NuGet\Install-Package Art.DocumentUtilities.Images -Version 3.0.0
<PackageReference Include="Art.DocumentUtilities.Images" Version="3.0.0" />
<PackageVersion Include="Art.DocumentUtilities.Images" Version="3.0.0" />
<PackageReference Include="Art.DocumentUtilities.Images" />
paket add Art.DocumentUtilities.Images --version 3.0.0
#r "nuget: Art.DocumentUtilities.Images, 3.0.0"
#:package Art.DocumentUtilities.Images@3.0.0
#addin nuget:?package=Art.DocumentUtilities.Images&version=3.0.0
#tool nuget:?package=Art.DocumentUtilities.Images&version=3.0.0
Art.DocumentUtilities
Art.DocumentUtilities provides synchronous, in-memory document utilities for .NET Framework 4.6.2 server code and Dataverse plug-ins. Version 3 splits the former monolithic package into independently installable functional packages while preserving the existing namespaces.
Choose the smallest package
| Function | NuGet package | Main API |
|---|---|---|
| Results, diagnostics, exceptions, limits | Art.DocumentUtilities.Core |
ProcessingResult<T>, DocumentProcessingLimits |
| HTML templates and Dataverse retrieval | Art.DocumentUtilities.DataverseTemplates |
HtmlTemplateRenderer, DataverseHtmlTemplateRenderer |
| HTML → PDF | Art.DocumentUtilities.Pdf |
HtmlToPdfConverter |
| DOCX and XLSX/XLSM | Art.DocumentUtilities.OpenXml |
DocxProcessor, XlsxProcessor |
| Image metadata | Art.DocumentUtilities.Images |
ImageInspector |
| QR and barcodes | Art.DocumentUtilities.Barcodes |
CodeImageGenerator |
| Old combined converters/contracts | Art.DocumentUtilities.Legacy |
DocumentConverter, LegacyWordProcessingAdapter |
| All features and compatibility facade | Art.DocumentUtilities |
Umbrella package; not recommended for new narrow consumers |
flowchart TD
Templates[DataverseTemplates] --> CRM[Microsoft.CrmSdk.CoreAssemblies\ncompile assets only]
Images --> Core
Barcodes --> Core
Barcodes --> Images
Barcodes --> ZXing[ZXing.Net]
OpenXml --> Core
OpenXml --> Images
OpenXml --> DFO[DocumentFormat.OpenXml]
OpenXml --> HAP[HtmlAgilityPack]
Pdf --> Core
Pdf --> HAP
Pdf --> PDFsharp
Legacy --> Barcodes
Legacy --> OpenXml
Legacy --> Pdf
Umbrella[Art.DocumentUtilities] --> Templates
Umbrella --> Legacy
There are no cycles. Core has no external NuGet dependency. DataverseTemplates + Pdf does not restore or reference Open XML or ZXing. Open Sans font files are embedded only in the PDF-capable assemblies, so PDF conversion does not depend on machine fonts.
Install
dotnet add package Art.DocumentUtilities.DataverseTemplates
dotnet add package Art.DocumentUtilities.Pdf
Other examples:
dotnet add package Art.DocumentUtilities.OpenXml
dotnet add package Art.DocumentUtilities.Barcodes
dotnet add package Art.DocumentUtilities.Images
Use dotnet add package Art.DocumentUtilities only when an existing application needs the complete legacy surface. New Dataverse plug-ins should reference DataverseTemplates and the specific functional packages they use.
Dataverse template → HTML → PDF
using Art.DocumentUtilities.Pdf;
using Art.DocumentUtilities.Templates;
HtmlTemplateRenderResult rendered = DataverseHtmlTemplateRenderer.RenderWithTextAttribute(
service,
templateTableLogicalName: "art_documenttemplate",
templateNameColumnLogicalName: "art_name",
mainTableColumnLogicalName: "art_maintablelogicalname",
templateHtmlFileColumnLogicalName: "art_htmlfile",
templateTextAttributeLogicalName: "art_subject",
templateName: "Welcome email",
mainTableLogicalName: "account",
mainRecordId: accountId,
tracingService: tracingService);
byte[] pdf = new HtmlToPdfConverter().Convert(rendered.Html).Value;
string subject = rendered.Text;
Guid templateId = rendered.TemplateId;
Microsoft.CrmSdk.CoreAssemblies is declared by DataverseTemplates with runtime assets excluded. Dataverse supplies those platform assemblies; they are not copied into a plug-in package by this library.
DOCX, XLSX, images, and barcodes
using Art.DocumentUtilities.Docx;
var options = new DocxTransformOptions();
options.Replacements.Add(new DocxReplacement
{
Type = DocxReplacementType.Text,
Placeholder = "{{customerName}}",
Text = "Ada Lovelace"
});
byte[] transformed = new DocxProcessor().Transform(templateBytes, options).Value;
using Art.DocumentUtilities.Xlsx;
var options = new XlsxTransformOptions();
options.Operations.Add(new XlsxCellFill
{
SheetIndex = 0,
RowIndex = 1,
ColumnIndex = 2,
Value = WorkbookCellValue.Decimal(1234.50m)
});
byte[] transformed = new XlsxProcessor().Transform(workbookBytes, options).Value;
Every transforming operation returns ProcessingResult<T>. Inspect Diagnostics for stable non-fatal warning codes. Invalid documents, unsupported features, and resource-limit violations throw exceptions in Art.DocumentUtilities.Processing.
Bounded processing
HTML conversion supports paragraphs, headings, line breaks, inline bold/italic/underline, lists, simple tables without spans, and block-level base64 PNG/JPEG/BMP images. DOCX-to-PDF remains available through the compatibility package. Scripts, external resources, arbitrary CSS, SVG, positioned layouts, Word fields, tracked changes, charts, SmartArt, and other layout-engine features are rejected.
The default profile allows 16 MiB compressed input, 128 MiB expanded OOXML, 32 MiB output, 2,048 ZIP entries, a 100:1 entry compression ratio, 25-megapixel images, 1,000 ordered operations, and one million extracted worksheet cells. Callers can supply stricter DocumentProcessingLimits.
Build, test, pack, and verify
dotnet restore Art.DocumentUtilities.sln
dotnet build Art.DocumentUtilities.sln -c Release --no-restore
dotnet test Art.DocumentUtilities.sln -c Release --no-build
dotnet pack Art.DocumentUtilities.sln -c Release --no-build -o artifacts/packages
dotnet restore smoke/DataversePdfPackageConsumer/DataversePdfPackageConsumer.csproj
dotnet build smoke/DataversePdfPackageConsumer/DataversePdfPackageConsumer.csproj -c Release --no-restore
./smoke/DataversePdfPackageConsumer/bin/Release/net462/DataversePdfPackageConsumer.exe
dotnet restore smoke/UmbrellaPackageConsumer/UmbrellaPackageConsumer.csproj
dotnet build smoke/UmbrellaPackageConsumer/UmbrellaPackageConsumer.csproj -c Release --no-restore
./smoke/UmbrellaPackageConsumer/bin/Release/net462/UmbrellaPackageConsumer.exe
./build/Verify-Packages.ps1
See MIGRATION.md for upgrading from 2.x and docs/PUBLIC-API.md for the package ownership inventory.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- Art.DocumentUtilities.Core (>= 3.0.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Art.DocumentUtilities.Images:
| Package | Downloads |
|---|---|
|
Art.DocumentUtilities
Backward-compatible umbrella package for all Art.DocumentUtilities functional packages. |
|
|
Art.DocumentUtilities.OpenXml
Bounded in-memory DOCX and XLSX/XLSM processing. |
|
|
Art.DocumentUtilities.Barcodes
Managed QR and one-dimensional barcode generation as PNG. |
|
|
Art.DocumentUtilities.Legacy
Compatibility facade for the original combined DocumentConverter and legacy WebAPI contracts. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0 | 96 | 9/18/2026 |