GetLastHTMLImportDiagnosticsA

HTML, CSS, print layout

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to GetLastHTMLImportDiagnostics and string arguments are interpreted using the current SetAnsiMode code page

Inspect ignored CSS, font resolution and HTML pagination results

Syntax

Delphi

Function DLGetLastHTMLImportDiagnosticsA(InstanceID: Integer): PAnsiChar;

DLL

const char* DLGetLastHTMLImportDiagnosticsA(int InstanceID);

ActiveX

Function PDFlib::GetLastHTMLImportDiagnostics() As String

Remarks

Returns the selected document's latest measured or rendered HTML layout report, including reports retained in the layout cache; reading it does not clear the latest error

Frame reports use scope html-css-import with not-started, ok, degraded or rejected status, declared/resolved font-face counts, page-rule counts and bounded findings containing code, subject and detail

Findings cover unsupported properties and selected values, selectors, media conditions and at-rules, unresolved font resources, unsupported page descriptors or page identifiers and finite CSS budgets; they qualify parsed CSS declarations, including unmatched rules, rather than proving complete browser rendering fidelity

At most 256 unique findings are retained, with bounded subject/detail strings and a truncated flag; stylesheets allow at most 1 MiB, 2048 rules, 8 nested at-rule levels, 256-byte selectors and 4096-byte rule declaration blocks

Static print media handling recognizes unconditional print/all/screen selection; conditional media queries and supports/layer/keyframe/import rules are not evaluated and generate findings when applicable

Attribute selectors support presence, equality, word, language-prefix, prefix, suffix and substring matching, optional i/s case flags and class-level specificity; CSS escapes and namespaces remain outside the selector profile

Right margins reduce the content width across text, supported container layouts and continuation; the existing finite box model clamps negative horizontal margins, treats auto margins as zero and does not implement full CSS margin collapsing or every box-sizing rule

Page reports use scope html-paged-import with completed, partial or rejected status, pagesDrawn, blankPages, marginBoxesDrawn, pageProgression, remainingCharacters, complete, pageRules and up to 16 unique frameReports; reportsTruncated identifies additional distinct frame reports

pagesDrawn includes parity blank pages, blankPages counts those pages separately, and pageProgression is ltr; a page-budget result can therefore contain no placed text when a leading directional break consumes the budget with a blank page

marginBoxesDrawn counts generated margin boxes, including blank-page headers or footers; findings identify unsupported generated content or margin properties, unavailable total-page counts, clipped overflow and running-element or generation budgets

Table findings include table-continuation for retained column/header state, table-cell-continuation for independently split oversized cells, table-rowspan-continuation for spanning groups split at row boundaries, and layout-error for invalid cells, exhausted table budgets or an area that cannot place content

Paragraph findings include orphan-lines-deferred, widow-lines-retained, break-inside-deferred, break-inside-relaxed and line-constraints-relaxed; these identify decisions in the finite paragraph profile and never imply complete CSS fragmentation conformance

container-fragment-continuation identifies an oversized Flex/Grid container placed through retained item geometry and independent content continuations; invalid overlap, geometry or item/band/cell budgets produce layout-error without silently dropping source items

table-row-forced-break identifies a supported row or resolved Flex/Grid item-band boundary; leading/trailing container breaks and directional requirements survive the continuation without treating previously placed body content as a blank page

table-row-page-type identifies a supported body-row or resolved item-band transition to a different page type; simultaneous cell page-type conflicts and a leading type inconsistent with selected geometry produce layout-error before placing that frame

nested-cell-break-degraded identifies a nested cell break outside the supported row/item-band propagation profile; page-type changes within one cell reject with layout-error, and completed metadata-only cell shells do not create false page-type conflicts

Every report keeps fullFidelity false; unsupported CSS can use a documented fallback, and a successful layout is not a claim of complete HTML/CSS or accessibility conformance

DLL string storage belongs to the instance and is replaced by its next string-returning call; the A variant follows the configured ANSI encoding mode

ActiveX exposes this method through IPDFlibrary16 and the default dispatch interface; Pascal Automation callers can use CoPDFlibrary.CreateConversionTools

The macOS Dylib exposes the same wide and A C entry points shown above using the C calling convention; string pointers belong to the instance and must be copied before the next string-returning call, and A variants follow the configured ANSI or UTF-8 mode

See also

DrawHTMLTextBox