# HtmlSiteBundle

A bounded ZIP website snapshot with an inert HTML root and archive-owned resource bytes.

Class 

`OfficeIMO.Html`

**Namespace**

`OfficeIMO.Html`

**Assembly**

`OfficeIMO.Html`

**Source revision**

`3b680b1b6fb1` with working tree changes

**Source**

[HtmlSiteBundle.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Html/Inputs/HtmlSiteBundle.cs#L40)

**Modifiers**

sealed

A bounded ZIP website snapshot with an inert HTML root and archive-owned resource bytes. Loading does not extract files, execute scripts or fetch resources from the host or network.

## Inheritance

- object
- HtmlSiteBundle

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Read MHTML Web Archives and Site Bundles](/docs/html/mhtml-and-site-bundles/) Guide
  
  Open MHTML web archives or zipped websites, read their HTML and resources, create new archives, and convert them to PDF or images offline.

## Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 2

- Method [HtmlSiteBundle.Load](/api/html/officeimo-html-htmlsitebundle/#method-load-string-officeimo-html-htmlsitebundleoptions-officeimo-html-htmlconversiondocumentoptions-threading-cancellationtoken)
- Method [HtmlSiteBundle.LoadAsync](/api/html/officeimo-html-htmlsitebundle/#method-loadasync-string-officeimo-html-htmlsitebundleoptions-officeimo-html-htmlconversiondocumentoptions-threading-cancellationtoken)

Filter members 

Show inherited

## Methods

`public HtmlRenderRequest CreateRenderRequest(HtmlRenderRequest request)` [#](#method-createrenderrequest-officeimo-html-htmlrenderrequest)

[HtmlSiteBundle.cs:86](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Html/Inputs/HtmlSiteBundle.cs#L86)

Snapshots a display-list, SVG or raster request with archive-first resources. Any explicitly supplied resolver remains the fallback, subject to the renderer's URL and byte limits. PDF callers use the owning PDF adapter so its embedded-package policy also applies.

Parameters

**request OfficeIMO.Html.HtmlRenderRequest required**

Returns

`HtmlRenderRequest`

`public HtmlRenderResourceResolver CreateResourceResolver()` [#](#method-createresourceresolver)

[HtmlSiteBundle.cs:80](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Html/Inputs/HtmlSiteBundle.cs#L80)

Creates a resolver serving only archive snapshots. It never reads local or remote files.

Returns

`HtmlRenderResourceResolver`

Load 2 overloads

`public static HtmlSiteBundle Load(string path, HtmlSiteBundleOptions? options = null, HtmlConversionDocumentOptions? htmlOptions = null, CancellationToken cancellationToken = default)` [#](#method-load-string-officeimo-html-htmlsitebundleoptions-officeimo-html-htmlconversiondocumentoptions-threading-cancellationtoken)

[HtmlSiteBundle.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Html/Inputs/HtmlSiteBundle.cs#L40)

Loads a ZIP site bundle from a file, without extracting it.

Parameters

**path string required**

**options OfficeIMO.Html.HtmlSiteBundleOptions? = null optional**

**htmlOptions OfficeIMO.Html.HtmlConversionDocumentOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`HtmlSiteBundle`

`public static HtmlSiteBundle Load(Stream stream, HtmlSiteBundleOptions? options = null, HtmlConversionDocumentOptions? htmlOptions = null, CancellationToken cancellationToken = default)` [#](#method-load-io-stream-officeimo-html-htmlsitebundleoptions-officeimo-html-htmlconversiondocumentoptions-threading-cancellationtoken)

[HtmlSiteBundle.cs:50](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Html/Inputs/HtmlSiteBundle.cs#L50)

Loads a ZIP site bundle from a caller-owned stream. Seekable input is read from the beginning and its original position is restored; nonseekable input is read forward.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Html.HtmlSiteBundleOptions? = null optional**

**htmlOptions OfficeIMO.Html.HtmlConversionDocumentOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`HtmlSiteBundle`

LoadAsync 2 overloads

`public static async Task<HtmlSiteBundle> LoadAsync(string path, HtmlSiteBundleOptions? options = null, HtmlConversionDocumentOptions? htmlOptions = null, CancellationToken cancellationToken = default)` [#](#method-loadasync-string-officeimo-html-htmlsitebundleoptions-officeimo-html-htmlconversiondocumentoptions-threading-cancellationtoken)

Asynchronously loads a ZIP site bundle from a file, without extracting it.

Parameters

**path string required**

**options OfficeIMO.Html.HtmlSiteBundleOptions? = null optional**

**htmlOptions OfficeIMO.Html.HtmlConversionDocumentOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<HtmlSiteBundle>`

`public static async Task<HtmlSiteBundle> LoadAsync(Stream stream, HtmlSiteBundleOptions? options = null, HtmlConversionDocumentOptions? htmlOptions = null, CancellationToken cancellationToken = default)` [#](#method-loadasync-io-stream-officeimo-html-htmlsitebundleoptions-officeimo-html-htmlconversiondocumentoptions-threading-cancellationtoken)

Asynchronously loads a ZIP site bundle while leaving the caller's stream open and restoring its original position when seekable.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Html.HtmlSiteBundleOptions? = null optional**

**htmlOptions OfficeIMO.Html.HtmlConversionDocumentOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<HtmlSiteBundle>`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public HtmlConversionDocument HtmlDocument { get; }` [#](#property-htmldocument)

[HtmlSiteBundle.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Html/Inputs/HtmlSiteBundle.cs#L23)

Parsed HTML entry document.

`public string EntryPath { get; }` [#](#property-entrypath)

[HtmlSiteBundle.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Html/Inputs/HtmlSiteBundle.cs#L25)

Selected normalized, case-sensitive HTML entry path.

`public Uri ArchiveBaseUri { get; }` [#](#property-archivebaseuri)

[HtmlSiteBundle.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Html/Inputs/HtmlSiteBundle.cs#L27)

Virtual directory URI that maps archive paths.

`public Uri BaseUri { get; }` [#](#property-baseuri)

[HtmlSiteBundle.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Html/Inputs/HtmlSiteBundle.cs#L29)

Virtual URI of the selected HTML entry.

`public IReadOnlyList<string> EntryNames { get; }` [#](#property-entrynames)

[HtmlSiteBundle.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Html/Inputs/HtmlSiteBundle.cs#L31)

Regular-file entry names in ordinal order.

`public long ArchiveBytes { get; }` [#](#property-archivebytes)

[HtmlSiteBundle.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Html/Inputs/HtmlSiteBundle.cs#L33)

Encoded ZIP size observed when loading.

`public long DecodedBytes { get; }` [#](#property-decodedbytes)

[HtmlSiteBundle.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Html/Inputs/HtmlSiteBundle.cs#L35)

Combined decoded size of all regular-file entries.

<!-- PowerForge markdown artifact sha256:19DB7B044A09EF0867C238173F651D2E7B74C72BE9C7BE4D78EA2C2E39655250 -->
