API Reference
HtmlResourcePipeline
Shared resource discovery and policy planning for OfficeIMO HTML workflows.
Inheritance
- Object
- HtmlResourcePipeline
Methods
public static HtmlResourceManifest BuildManifest(String html, HtmlResourcePipelineOptions? options = null) #HtmlResourceManifestParses raw HTML and builds a resource manifest.
Parameters
- html System.String
- options OfficeIMO.Html.HtmlResourcePipelineOptions? = null
public static HtmlResourceManifest BuildManifest(HtmlDocument document, HtmlResourcePipelineOptions? options = null) #HtmlResourceManifestBuilds a resource manifest from a parsed document.
Parameters
- document OfficeIMO.Html.Dom.HtmlDocument
- options OfficeIMO.Html.HtmlResourcePipelineOptions? = null
public static HtmlResourceManifest BuildStylesheetManifest(String css, Uri baseUri, HtmlResourcePipelineOptions? options = null) #HtmlResourceManifestParses an external stylesheet and builds the same policy-aware resource manifest used by the HTML renderer for imports, fonts, and images.
Parameters
- css System.String
- Stylesheet source text.
- baseUri System.Uri
- Absolute URI used to resolve relative stylesheet references.
- options OfficeIMO.Html.HtmlResourcePipelineOptions? = null
- Optional resource policy and media-context settings.
Returns
A manifest containing applicable imports and referenced font and image resources.
public static String RewriteCssResourceUrls(String css, Func<String, HtmlResourceKind, String> rewrite) #StringRewrites stylesheet imports, URL functions and image-set strings without discarding media, supports or layer conditions.
Parameters
- css System.String
- Stylesheet or inline declaration source.
- rewrite System.Func<System.String, OfficeIMO.Html.HtmlResourceKind, System.String>
- Maps a decoded source URI and its resource kind to a replacement URI.
Returns
CSS with changed resource carriers rewritten; source outside those carriers is retained.
public static String RewriteCssResourceUrls(String css, Func<String, HtmlResourceKind, String> rewrite, Boolean includeFragmentReferences) #StringRewrites CSS resource URLs, optionally including local fragment references when relocating document content.
Parameters
- css System.String
- rewrite System.Func<System.String, OfficeIMO.Html.HtmlResourceKind, System.String>
- includeFragmentReferences System.Boolean
public static Boolean TryDecodeStylesheet(Byte[] bytes, String? contentType, out String css, IHtmlEncodingProvider? encodingProvider = null) #BooleanAttempts to decode stylesheet bytes using CSS encoding precedence: byte-order mark, transport content-type charset, @charset, then strict UTF-8.
Parameters
- bytes System.Byte[]
- Encoded stylesheet bytes.
- contentType System.String?
- Optional transport content type containing a charset.
- css System.String
- Decoded stylesheet text when successful.
- encodingProvider OfficeIMO.Html.Dom.IHtmlEncodingProvider? = null
- Optional web charset provider for this decoding operation.
Returns
true when the stylesheet encoding is supported and valid.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?