UniversalOffice.Core 0.9.3

dotnet add package UniversalOffice.Core --version 0.9.3
                    
NuGet\Install-Package UniversalOffice.Core -Version 0.9.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UniversalOffice.Core" Version="0.9.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UniversalOffice.Core" Version="0.9.3" />
                    
Directory.Packages.props
<PackageReference Include="UniversalOffice.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add UniversalOffice.Core --version 0.9.3
                    
#r "nuget: UniversalOffice.Core, 0.9.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package UniversalOffice.Core@0.9.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=UniversalOffice.Core&version=0.9.3
                    
Install as a Cake Addin
#tool nuget:?package=UniversalOffice.Core&version=0.9.3
                    
Install as a Cake Tool

UniversalOffice.Core

The shared base of the UniversalOffice libraries for .NET. You normally don't install it yourself: it comes in as a dependency of UniversalOffice.Docx (read, edit, sanitize and template Word documents, and render them to PDF).

Pure managed code for net8.0, with no native dependencies and no other NuGet packages.

Install

dotnet add package UniversalOffice.Docx

What's inside

UniversalOffice.Core

  • OpcPackage: lossless access to OOXML packages (ZIP). Parts you don't touch are saved byte for byte, in their original order.
  • OpcPackageLimits: caps the size of each part and of the whole package when the input is untrusted; going over a limit throws OfficeLimitExceededException.
  • OpcPartName: resolves relationship targets with one documented rule, so a validator and the reader agree on which part a relationship points to.
  • MiniXml, a small XML reader with a depth limit, and OOXML unit conversions.

UniversalOffice.Fonts

  • SfntFont: TrueType/OpenType parser (cmap, hmtx, OS/2, post, GPOS and kern kerning, GSUB).
  • SystemFontIndex: the fonts installed on Windows, Linux and macOS, read at run time, subfolders included. On Linux: /usr/share/fonts, /usr/local/share/fonts, ~/.fonts and ~/.local/share/fonts; on macOS: /System/Library/Fonts, /Library/Fonts and ~/Library/Fonts; anywhere, the folders in the EXTRA_FONT_DIRS environment variable (separated by ;). Before 0.9.2 the index was empty outside Windows (paths were joined with \).
  • Liang hyphenation with embedded hyph-utf8 patterns (pt, en-US, es, fr, it, nl, de).

UniversalOffice.Pdf

  • A PDF writer with no dependencies: TrueType subsetting (Type0/Identity-H), JPEG and PNG images (with alpha), paths, clipping, transforms, opacity, links and outlines.
  • PdfFontSource: a TrueType font passed to the PDF exporters.

UniversalOffice.DrawingML

  • The DrawingML engine: the official preset shape definitions, outlines, rasterization, picture effects (shadow, glow, soft edges, reflection), 3D lighting and bevels, and pattern fills.

Example

using UniversalOffice.Core;

// Read an OOXML package received from a user, with size limits.
var limits = new OpcPackageLimits { MaxPartBytes = 50L << 20, MaxTotalBytes = 150L << 20 };
var package = OpcPackage.Load(bytes, limits);   // OfficeLimitExceededException when over a limit

License

MIT. The hyphenation patterns come from the hyph-utf8 project under their own permissive licenses; their notices ship in this package at licenses/hyphenation/THIRD-PARTY-NOTICES.md.

Product 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 was computed.  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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on UniversalOffice.Core:

Package Downloads
UniversalOffice.Docx

Word documents in pure .NET: lossless .docx reading and editing (sanitizing untrusted documents, applying content to templates, #{parameter} replacement, plugin inlines, appending formatted content), a Word-compatible layout engine that renders .docx to PDF with installed or metric-compatible substitute fonts, a Word 97-2003 (.doc) to .docx converter, and .docx to Markdown/HTML exporters. No native dependencies.

UniversalOffice.Pptx

PowerPoint presentations in pure .NET: lossless .pptx reading (slides, layouts, masters, text style cascade, flattened groups, tables), text layout, run text updates, and exporters to Markdown, HTML and vector PDF. No native dependencies.

UniversalOffice.Xlsx

Excel workbooks in pure .NET: lossless .xlsx reading (cells, shared strings, styles, theme, merges), Excel number formatting, surgical worksheet updates, and exporters to CSV/TSV, Markdown, HTML, ODS, SpreadsheetML 2003 and PDF. No native dependencies.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.9.3 57 10/31/2026
0.9.2 57 10/30/2026
0.9.1 61 10/30/2026