GetLastMetafileDiagnosticsA
Vector graphics, Image handling, Diagnostics
Description
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to GetLastMetafileDiagnostics and string arguments are interpreted using the current SetAnsiMode code page
Returns JSON describing the latest metafile import on the selected document, including dedicated EMF imports and metafiles added through generic image imports
Syntax
Delphi
Function DLGetLastMetafileDiagnosticsA(InstanceID: Integer): PAnsiChar;
DLL
const char* DLGetLastMetafileDiagnosticsA(int InstanceID);
Report
| schemaVersion | Report format version, currently 1 |
|---|---|
| backend | windows-vector, windows-raster, native-vector, or metafile-loader; empty before the first import |
| status | not-run before import, complete after vector conversion without diagnosed issues, partial after successful conversion with warnings, failed after failure, or rasterized after bitmap import |
| success | Whether conversion completed without a fatal error; inspect warnings even when this value is true |
| recordsInspected, recordCount | Whether vector records were inspected and how many were visited, including the EMF header and end-of-file record when reached |
| issueCount, unsupportedRecordCount, invalidRecordCount, errorCount | Total issues and the unsupported, invalid, and fatal-error counts |
| truncated, issues | At most 512 detailed issues with up to 2048 message characters each; counts continue after the detail limit, and truncated indicates omitted issue entries |
Each issue contains recordIndex, recordType, severity, code, and message. Record indices are one-based; loader failures use zero because no individual record was reached
Remarks
Imports replace the document report, including failed imports and explicit raster imports. An ordinary non-metafile image import does not clear it, and the getter does not start conversion
Raster imports report recordsInspected: false and do not claim vector-record coverage. A complete vector report means no issue was diagnosed by this converter; it is not a certification of pixel equivalence for arbitrary input
Warnings identify unknown records, unconverted device escapes, destination-dependent fills and regions, logical palettes, OpenGL, path widening, unsupported state, EMF+ drawing comments, and specialized color-managed alpha, masking, parallelogram, or transparent bitmap paths that have not been qualified
Windows vector import retains literal DIB colors, monochrome brush colors, hatch foreground and opaque or transparent backgrounds, and device brush origins across saved contexts. Pattern variants are frozen for their color state, and retained pattern bitmap data is limited to 64 MiB per conversion
ANSI and Unicode text, multiple-text records, and compact text can supply native glyph outlines inside path brackets, without painting text before the path is filled, stroked, or used as a clip
This getter is available through Delphi, DLGetLastMetafileDiagnostics, DLGetLastMetafileDiagnosticsA and the IPDFlibrary2 Automation extension