OfficeIMO Documentation

repository·master·Indexed 19 days ago

https://github.com/evotecit/officeimo

A suite of .NET libraries for high-fidelity manipulation of Microsoft Office formats (Word, Excel, PowerPoint, Visio) and PDFs. It features native format support, dependency-light cores, and tools for document conversion, compatibility mode management, and Markdown-inspired markup generation via officeimo-markup.

Tokens
400.1K
Snippets
961
Records
1.6K
Agent score
63%

What's inside OfficeIMO

  1. Overview of OfficeIMO libraries

    master

    OfficeIMO is a family of COM-free .NET libraries designed for creating, reading, editing, converting, and exporting Office and various document formats.

    Key characteristics:

    • COM-free: Runs in services, desktop applications, build agents, containers, and automation hosts without requiring Microsoft Office, Excel, PowerPoint, Visio, or LibreOffice automation.
    • First-party implementations: Unlike many libraries that act as facades, OfficeIMO owns its implementations for OneNote, PDF, Markdown, RTF, OpenDocument, AsciiDoc, LaTeX, CSV, EPUB, ZIP, drawing, and legacy binary formats (.doc, .xls, .ppt/.pot/.pps).
    • Coordinated Versioning: Applications should keep all OfficeIMO packages on the same coordinated version (e.g., the 3.1.x source line).
    • Extensible Converters: Converters use the same first-party object models as the native packages and provide diagnostics when a target format cannot fully represent the source data.
  2. Overview of the OfficeIMO XLSB Corpus

    master

    The XLSB Corpus is a collection of Excel-generated .xlsb files used to test the BIFF12 package reader. Unlike packages generated by OfficeIMO, these files are authored by Microsoft Excel and serve as independent fixtures to ensure compatibility and correctness.

    Coverage includes:

    • Values and shared strings
    • Formulas, styles, and dates
    • Worksheet geometry and merged cells
    • Views
    • Internal and external hyperlinks

    Testing Methodology: Tests utilize the standard ExcelDocument.Load(...) API to load these files, verify the resulting projected workbook model, and compare preserved binary package parts after edits. Note that because OfficeIMO does not currently guarantee a complete native XLSB writer, tests specifically distinguish between editable projected content and preserved binary records/parts.

  3. Overview of OfficeIMO.GoogleWorkspace.Drive

    master

    OfficeIMO.GoogleWorkspace.Drive provides typed, dependency-light support for the Google Drive API. It is a shared component used by the OfficeIMO Google Docs, Sheets, and Slides packages.

    Key capabilities include:

    • Metadata Management: Handling file and folder metadata.
    • File Operations: Copy, move, delete, and shared-drive validation.
    • Permissions & Collaboration: Managing permissions, comments, and replies.
    • Version Control: Handling revisions and change tokens.
    • Data Transfer: Import/export format discovery, downloads, multipart uploads, and resumable uploads.
    • Public Content: Temporary public-content leases with cleanup reporting.

    Important Safety Constraints:

    • DELETE Operations: Require a policy that explicitly accepts the named data loss.
    • Durable Downloads: Verify and truncate only uncheckpointed crash tails.
    • Resumable Uploads: Revalidate their seekable source before reporting success.
  4. Overview of OfficeIMO.Drawing capabilities

    master

    The OfficeIMO.Drawing package provides shared document and drawing primitives used across the OfficeIMO ecosystem. It is designed to be a dependency-free foundation for visual elements, ensuring consistent behavior for lifecycle management, security contracts, colors, images, text layout, ink, math, and vector/raster drawing.

    Key capabilities include:

    • Lifecycle & Security: Shared vocabulary for document access and persistence (DocumentAccessMode, DocumentPersistenceMode), and security contracts (IOfficeSecurityProvider) for CMS/X.509/XML-signature requests.
    • Color & Imaging: Immutable OfficeColor (RGBA), color space conversion (OfficeColorSpaceConverter), and image inspection (OfficeImageReader) without pixel decoding.
    • Text & Fonts: Deterministic layout estimates via OfficeTextMeasurer and font information via OfficeFontInfo and OfficeTrueTypeFont.
    • Ink & Math: Reusable models for ink (OfficeInkDocument, OfficeInkStroke) and structured math (OfficeMathExpression, OfficeMath) including MathML/LaTeX support.
    • Drawing & Graphics: Vector descriptors (OfficeShape, OfficeDrawing), gradients, shadows, transforms, and SVG formatting. It also provides raster rendering primitives (OfficeRasterCanvas, OfficeDrawingRasterRenderer) and encoders for PNG, JPEG, TIFF, and WebP.
  5. Overview of OfficeIMO Excel Conversion Tools

    master

    Specialized packages for converting Excel data across different formats.

    Supported Conversions:

    • CSV: Bidirectional CSV-to-Excel and Excel-to-CSV conversion using a canonical CSV parser. Supports file, stream, and CsvDocument imports.
    • HTML: Semantic Excel-to-HTML and HTML-to-editable-Excel round trips, preserving sheet names, formulas, merges, and charts.
    • PDF: Excel to PDF using print areas, page setup, and headers/footers. Also supports PDF logical-table recovery back into editable Excel.
    • OpenDocument (ODT): (Referenced in source as part of the Excel suite).
  6. Overview of OfficeIMO package ecosystem

    master

    OfficeIMO is a collection of .NET libraries designed for document manipulation, conversion, and semantic extraction. The ecosystem is organized into specialized packages that allow for bidirectional workflows between various formats (e.g., Excel to ODS, PowerPoint to HTML, Markdown to PDF, LaTeX to Markdown).

    Key capabilities include:

    • Bidirectional Conversion: Moving between native formats (XLSX, PPTX, ODT, ODS, ODP) and web/markup formats (HTML, Markdown, RTF, AsciiDoc, LaTeX).
    • Semantic Projections: Converting complex documents into structured, typed representations (like MarkdownDoc) to preserve hierarchy, tables, and assets.
    • PDF Workflows: Generating PDFs from almost any supported format or recovering editable content from PDFs.
    • Unified Reading: Using the OfficeIMO.Reader family to extract text, tables, and metadata from diverse document types using a consistent schema.
  7. Overview of OfficeIMO Epub and Zip APIs

    master

    Tools for handling EPUB containers and ZIP archives.

    Key Capabilities:

    • Epub: Parsing of EPUB containers, OPF packages, manifests, spines, and navigation (NCX). Supports metadata and deterministic chapter extraction.
    • Epub Image: Direct chapter-to-image export using a shared HTML rendering scene, supporting PNG, JPEG, TIFF, WebP, and SVG.
    • Zip: Deterministic ZIP entry traversal with security guards against relative traversal, absolute paths, and drive paths. Includes limits for depth, entry count, and size.
  8. Overview of OfficeIMO packages and capabilities

    master

    OfficeIMO is a suite of .NET libraries for working with office and document formats. The ecosystem is divided into specialized packages for different file types, all sharing a common foundation for drawing and visual operations.

    Core Drawing Foundation

    • OfficeIMO.Drawing: The shared foundation for all visual tasks. It provides immutable RGBA colors, image handling (MIME, dimensions, transforms), font descriptors, text shaping contracts, and vector/raster drawing primitives (shapes, paths, gradients, etc.). It has zero third-party runtime dependencies.
    • OfficeIMO.Drawing.HarfBuzz: An optional extension for full OpenType GSUB/GPOS shaping via the IOfficeTextShapingProvider contract. Requires HarfBuzzSharp.
    • OfficeIMO.Drawing.CodeGlyphX: An optional bridge to convert CodeGlyphX barcode symbols into OfficeDrawing scenes.

    Document-Specific Packages

    • OfficeIMO.Word: Handles .docx (creation, editing, saving) and a subset of legacy .doc. Supports rich text, tables, images, charts, sections, headers/footers, and mail merge.
    • OfficeIMO.Excel: Handles .xlsx (workbooks, worksheets, ranges) and a subset of legacy .xls. Supports formulas, pivot tables, charts, data validation, and conditional formatting.
    • OfficeIMO.PowerPoint: Handles .pptx (slides, layouts, placeholders) and legacy .ppt/.pot/.pps. Supports text boxes, shapes, charts, and transitions.
    • OfficeIMO.Visio: Handles Open XML Visio packages (drawings, templates, stencils) without requiring Visio automation. Supports shapes, connectors, layers, and masters.
    • OfficeIMO.Pdf: Provides PDF capabilities (details in specific documentation).
  9. Overview of OfficeIMO OneNote API

    master

    The OfficeIMO.OneNote package provides managed read, create, edit, and round-trip writing for OneNote files.

    Key Capabilities:

    • Format Support: Handles desktop and FSSHTTP-encoded .one sections, .onetoc2 notebook hierarchies, and managed Cabinet .onepkg files.
    • Content Management: Supports pages, subpages, rich content, layout, OCR/media metadata, and editable native ink/recognition.
    • Visual Integration: Uses a shared Drawing canvas supporting PNG, JPEG, TIFF, SVG, and WebP, with position-preserving visual HTML/PDF conversion paths.
    • Interoperability: Designed for Microsoft OneNote open/edit/save/reopen interoperability.

    Dependency Footprint: Only requires first-party OfficeIMO.Drawing. It has zero third-party runtime dependencies and does not require Microsoft Graph, COM, or an installed OneNote instance.

  10. Overview of OfficeIMO.Markdown

    master

    The OfficeIMO.Markdown package is a focused Markdown toolkit for .NET that provides three core capabilities:

    1. Fluent Builder: Programmatically compose Markdown documents using a chainable API.
    2. Reader / AST: Parse Markdown text into a typed Abstract Syntax Tree (AST) for analysis, searching, and transformation.
    3. HTML Renderer: Convert Markdown documents into HTML with GitHub-like output, syntax highlighting, and automatic Table of Contents (ToC) generation.

    Compatibility & Dependencies:

    • Zero external dependencies.
    • Targets: .NET Standard 2.0, .NET 8, .NET 10, and .NET Framework 4.7.2.
  11. Overview of OfficeIMO Word Conversion Tools

    master

    A collection of specialized packages for converting Word documents between various formats.

    Supported Conversions:

    • HTML: Bidirectional conversion between Word and HTML, preserving headings, styles, tables, images, and form controls.
    • Markdown: Converts Word to GitHub-friendly Markdown (including tasks, tables, and footnotes) and supports typed Markdown AST to editable Word conversion.
    • PDF: Word to PDF (preserving sections, columns, and TOC links) and PDF to editable Word recovery for supported text and layout elements.
    • OpenDocument (ODT): Bidirectional conversion between Word and ODT, including feature-mapping reports for unsupported content.
    • RTF: Bidirectional conversion between Word and semantic RTF, supporting mail merge and find/replace workflows.
    • Google Docs: Plan and create Google Docs with tab-aware revision-safe replacement and Drive DOCX fallback.

    Dependency Footprint: Most packages rely on OfficeIMO.Word, OfficeIMO.Drawing, and the Open XML SDK.

  12. Overview of OfficeIMO Email and Store APIs

    master

    The OfficeIMO.Email suite provides comprehensive management for email formats and storage containers.

    Key Capabilities:

    • Message Handling: Read, create, edit, and write MIME/EML messages, native Outlook MSG/OFT/MAPI models (including messages, templates, contacts, appointments, tasks, and attachments), and TNEF/winmail.dat or mbox formats.
    • Calendar & Contacts: Standalone iCalendar/ICS and vCard/VCF support with full recurrence, temporal, and contact-group capabilities.
    • Store API: Provides managed, lazy sessions for PST and OST files with bounded page caches. It supports Outlook for Mac OLM, EMLX, Mbox, Maildir, and EML/MIME directories.
    • Data Projection: Uses a common OfficeIMO.Email.EmailDocument projection to unify different message models.
    • Search & Discovery: Features resumable semantic content search and a mixed-artifact discovery API across messages, calendars, contacts, and stores.

    Dependency Footprint: Requires System.Text.Encoding.CodePages and first-party OfficeIMO Drawing and RTF. OfficeIMO.Security is optional for S/MIME and is not a transitive dependency.