Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

OfficeImagePdfCompatibility

Namespace OfficeIMO.Drawing
Assembly OfficeIMO.Core
Modifiers static

Validates image bytes against the shared Drawing raster contract used by first-party PDF export preflight checks.

Inheritance

  • Object
  • OfficeImagePdfCompatibility

Methods

public static Boolean IsSupportedContentType(String contentType) #
Returns: Boolean

Returns true when the MIME content type belongs to the shared PDF raster source set.

Parameters

contentType System.String requiredposition: 0
public static Boolean IsSupportedFormat(OfficeImageFormat format) #
Returns: Boolean

Returns true when the shared image format can be embedded directly or normalized by OfficeIMO.Drawing.

Parameters

format OfficeIMO.Drawing.OfficeImageFormat requiredposition: 0
public static Boolean TryGetSupportedContentTypeFormat(String contentType, out OfficeImageFormat format) #
Returns: Boolean

Resolves a MIME content type accepted by the shared PDF raster source set to its image format.

Parameters

contentType System.String requiredposition: 0
format OfficeIMO.Drawing.OfficeImageFormat@ requiredposition: 1
TryValidate 2 overloads
public static Boolean TryValidate(Byte[] bytes, out OfficeImageInfo imageInfo, out String unsupportedReason) #
Returns: Boolean

Returns true when the image bytes can be embedded directly or normalized by the shared Drawing raster engine.

Parameters

bytes System.Byte[] requiredposition: 0
imageInfo OfficeIMO.Drawing.OfficeImageInfo@ requiredposition: 1
unsupportedReason System.String@ requiredposition: 2
public static Boolean TryValidate(Byte[] bytes, Int64 maximumTranscodePixels, out OfficeImageInfo imageInfo, out String unsupportedReason) #
Returns: Boolean

Returns true when the image bytes can be embedded directly or normalized without exceeding the supplied transcode pixel budget.

Parameters

bytes System.Byte[] requiredposition: 0
maximumTranscodePixels System.Int64 requiredposition: 1
imageInfo OfficeIMO.Drawing.OfficeImageInfo@ requiredposition: 2
unsupportedReason System.String@ requiredposition: 3
public static Boolean TryValidateDeclaredContentType(Byte[] bytes, String contentType, out OfficeImageInfo imageInfo, out String unsupportedReason) #
Returns: Boolean

Validates that image bytes can be identified and match the declared PDF-supported MIME content type.

Parameters

bytes System.Byte[] requiredposition: 0
Source image bytes.
contentType System.String requiredposition: 1
Declared MIME content type.
imageInfo OfficeIMO.Drawing.OfficeImageInfo@ requiredposition: 2
Detected image metadata when the bytes can be identified.
unsupportedReason System.String@ requiredposition: 3
Reason the declared content type and detected bytes are not compatible.

Returns

true when the declared PDF image format matches the detected image bytes.

public static Boolean TryValidateTranscodeDimensions(OfficeImageInfo imageInfo, Int64 maximumTranscodePixels, out String unsupportedReason) #
Returns: Boolean

Validates identified source dimensions before a PDF path decodes and re-encodes a raster payload.

Parameters

imageInfo OfficeIMO.Drawing.OfficeImageInfo requiredposition: 0
maximumTranscodePixels System.Int64 requiredposition: 1
unsupportedReason System.String@ requiredposition: 2

Fields

public const Int64 DefaultMaximumTranscodePixels #

Default pixel ceiling for raster formats that must be decoded and re-encoded before PDF embedding.

Value: 8000000