UniversalOffice.Core
0.9.3
dotnet add package UniversalOffice.Core --version 0.9.3
NuGet\Install-Package UniversalOffice.Core -Version 0.9.3
<PackageReference Include="UniversalOffice.Core" Version="0.9.3" />
<PackageVersion Include="UniversalOffice.Core" Version="0.9.3" />
<PackageReference Include="UniversalOffice.Core" />
paket add UniversalOffice.Core --version 0.9.3
#r "nuget: UniversalOffice.Core, 0.9.3"
#:package UniversalOffice.Core@0.9.3
#addin nuget:?package=UniversalOffice.Core&version=0.9.3
#tool nuget:?package=UniversalOffice.Core&version=0.9.3
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 throwsOfficeLimitExceededException.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 andkernkerning, 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,~/.fontsand~/.local/share/fonts; on macOS:/System/Library/Fonts,/Library/Fontsand~/Library/Fonts; anywhere, the folders in theEXTRA_FONT_DIRSenvironment 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 | 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 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. |
-
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.