API Reference
OfficeImagePdfCompatibility
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) #BooleanReturns true when the MIME content type belongs to the shared PDF raster source set.
Parameters
- contentType System.String
public static Boolean IsSupportedFormat(OfficeImageFormat format) #BooleanReturns true when the shared image format can be embedded directly or normalized by OfficeIMO.Drawing.
Parameters
- format OfficeIMO.Drawing.OfficeImageFormat
public static Boolean TryGetSupportedContentTypeFormat(String contentType, out OfficeImageFormat format) #BooleanResolves a MIME content type accepted by the shared PDF raster source set to its image format.
Parameters
- contentType System.String
- format OfficeIMO.Drawing.OfficeImageFormat@
public static Boolean TryValidate(Byte[] bytes, out OfficeImageInfo imageInfo, out String unsupportedReason) #BooleanReturns true when the image bytes can be embedded directly or normalized by the shared Drawing raster engine.
Parameters
- bytes System.Byte[]
- imageInfo OfficeIMO.Drawing.OfficeImageInfo@
- unsupportedReason System.String@
public static Boolean TryValidate(Byte[] bytes, Int64 maximumTranscodePixels, out OfficeImageInfo imageInfo, out String unsupportedReason) #BooleanReturns true when the image bytes can be embedded directly or normalized without exceeding the supplied transcode pixel budget.
Parameters
- bytes System.Byte[]
- maximumTranscodePixels System.Int64
- imageInfo OfficeIMO.Drawing.OfficeImageInfo@
- unsupportedReason System.String@
public static Boolean TryValidateDeclaredContentType(Byte[] bytes, String contentType, out OfficeImageInfo imageInfo, out String unsupportedReason) #BooleanValidates that image bytes can be identified and match the declared PDF-supported MIME content type.
Parameters
- bytes System.Byte[]
- Source image bytes.
- contentType System.String
- Declared MIME content type.
- imageInfo OfficeIMO.Drawing.OfficeImageInfo@
- Detected image metadata when the bytes can be identified.
- unsupportedReason System.String@
- 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) #BooleanValidates identified source dimensions before a PDF path decodes and re-encodes a raster payload.
Parameters
- imageInfo OfficeIMO.Drawing.OfficeImageInfo
- maximumTranscodePixels System.Int64
- unsupportedReason System.String@
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Fields
public const Int64 DefaultMaximumTranscodePixels #Default pixel ceiling for raster formats that must be decoded and re-encoded before PDF embedding.
8000000