THotPDF.ExportLoadedPagesStructured Method

Declaration

function ExportLoadedPagesStructured(
    const PageIndices: array of Integer;
    Format: THPDFStructuredExportFormat;
    Destination: TStream;
    const Options: THPDFStructuredExportOptions;
    out Info: THPDFStructuredExportInfo): boolean;

Behavior

PageIndices is processed in caller order and must contain at least one valid loaded-page index

All four formats use one accessibility model that prefers tagged structure and can fall back to geometric semantics when configured

Document language and title, outlines, page labels, annotations, links, form controls, page and recursive Form marked-content replacements, artifacts, source-stream identities, and image alternatives are preserved through format-specific semantic writers

Unsafe URI actions and password, file-select, NoExport, or signature payloads are excluded from the shared model before serialization

The form-control model reads the effective /Ff mask exactly from a usable original integer token, preserving high bits and low common flags together

Missing flags and direct or indirect null flags continue the existing bounded parent lookup, while an explicit numeric zero overrides its parent; real or invalidated tokens keep the original rounding fallback

The JSON flags, readOnly and required members and corresponding XML attributes keep their existing schema; NoExport remains an existing flag and payload-suppression rule rather than a new output property

Exact flag reads preserve ordinary permitted values as well as existing suppressed payloads, without mutating the source PDF or changing export authority

See AcroForm field flag precision for the signed 32-bit representation and inherited flag behavior

The destination receives UTF-8 without a byte-order mark and is written only after every requested page passes extraction, image, cancellation, and output limits

The destination must expose Position and Size; when existing bytes would be overwritten, they are read into a bounded rollback buffer before publication so a failed write can restore the original content, length, and position

True reports sesSucceeded; False reports a typed status, a diagnostic, and zero published OutputBytes

Structured Loaded-Page Export