HotPDF 2.1221.11 for Delphi and C++Builder

Native PDF generation, editing, signing, standards-aware output, font optimization, and imaging for RAD Studio applications

HotPDF lets VCL applications create, modify, secure, sign, optimize, import, compress, and save PDF documents directly from Delphi or C++Builder code, without deploying an external PDF runtime

What's New in This Release

Native page-import appearance recovery preserves supported missing-appearance annotations as vector content and searchable text, including rotated widgets and original CFF captions, with the same opt-in through JSON and the C ABI

Headless widget appearance recovery honors quarter-turn rotation for text, buttons and choices, including rotated icon fitting and list-row viewports

Native headless tone-response transfer functions support per-channel curves after transparency composition, with transfer-aware antialiasing and bounded output reconstruction

The complete version history is kept in the release notes

Project Overview

HotPDF is a source-level PDF component library for Delphi and C++Builder. It is built for desktop software that needs deterministic PDF output, direct page drawing, strong RAD Studio integration, and compact deployment

The component covers everyday PDF generation, advanced document assembly, PDF editing, image-heavy output, forms, annotations, encryption, signing workflows, font optimization, and stream-based workflows from a single native API surface. Beyond the Windows THotPDF component, a native headless document API, a versioned C ABI, and JSON document jobs bring the same engine to services, Linux, and Free Pascal

Native RAD Studio Fit

Use familiar Delphi and C++Builder projects, packages, streams, forms, and drawing patterns instead of wrapping a separate PDF engine. Source-oriented integration keeps debugging and deployment under your control

Standards-Aware by Default

Public APIs are checked against the selected PDF version and conformance profile, so calls that would break PDF/A, PDF/X, or PDF/UA raise diagnostic exceptions instead of silently writing non-compliant files

Compact, Fast Output

Reduce PDF size with zlib-ng compression, libjpeg-turbo imaging, TrueType and OpenType-CFF subsetting, CID-keyed CFF support, and internally instantiated TrueType and CFF2 variable fonts

Modern PDF Features

Build PDFs with forms, annotations, layers, transparency, page transitions, tagged structure, encryption, signing placeholders, and incremental updates

Bounded and Recoverable

Parsing, decoding, rendering, and conversion run under explicit byte, object, time, and memory budgets, with cooperative cancellation, typed diagnostics, and atomic file publication for hostile or damaged input

Reproducible Native Dependencies

Static third-party C library integration keeps compression and imaging dependencies reproducible, and shared Delphi and C++Builder examples make it easier to verify behavior in both language stacks

Editions

The core library is shared by every edition. Small Business and Enterprise add separate packages for specialized workflows; features that need them are marked with an edition label throughout this page

Edition Package Adds
Standard HotPDF The complete core library: generation, editing, fonts and shaping, forms, encryption, in-process PFX signing and signature verification, PDF/A, PDF/X, and PDF/UA gates, rendering, imaging, report-engine adapters, and the Direct File API
Small Business HotPDFSB (Lib\SmallBusiness) EN 16931 e-invoice business rules and contract / document comparison
Enterprise HotPDFEnt (Lib\Enterprise), plus HotPDFSB Preflight reporting and validation plugins, batch signature validation, PKCS#11 / CSC / remote / CNG signing providers, DSS / VRI evidence writers, B-LTA document timestamps, PAdES profile preflight, archival PDF/A-4 repair, the C ABI (HotPDFABI.dpr, hotpdf_abi.h), and JSON jobs

Document Creation and Layout

  • Create PDF files, add pages, draw text, draw vector graphics, and save to files or caller-owned streams
  • Control page text Y-coordinate semantics with THPDFPage.TextFromBaseLine, contain expert raw PDF operators with AppendScopedRawContent, and query wrapped text-box output with TextOutBoxEx / WideTextOutBoxEx
  • Reusable layout elements support side-effect-free measurement, verified split heads, and owned overflow continuations for paragraphs, rows, containers, and custom content; declarative page callbacks compose backgrounds, headers, document content, footers, and foregrounds in stable order, while unbounded reports retain file-backed page staging, paragraph constraints, bounded diagnostics, semantic helpers, and bidi direction control
  • Import HTML5 paged media with a tolerant DOM, print CSS cascade, measured paragraph layout with mixed RTL runs, widow and orphan constraints, optional hyphenation, tables, nested flex/grid business panels, wrapping rows, column spans, images and optional AcroForm controls, callback-controlled sfnt font resources, and bounded parser, layout, resource, and decoded-image budgets
  • Import SVG as reusable Form XObjects with native geometry, CSS, gradients, dash strokes, Alpha and Luminosity soft masks, measured Unicode text, embedded PNG/JPEG images, placement-aware links, and strict parser and resource budgets
  • Paginate RichEdit and RTF content through the Windows formatting engine while preserving vector text, fonts, images, supported OLE presentations, and explicit resource budgets
  • Render native vector charts with line, bar, area, pie, and scatter series, automatic or manual axes, themes, legends, labels, bounded data, and optional PDF/UA Figure alternatives
  • Convert and render XPS, EPUB, and CBZ through optional content-scored handlers that preserve fixed-page, spine, or natural image order and convert XPS paths, gradient, image, and VisualBrush brushes, opacity masks, clipping, Glyphs runs with exact package fonts, and navigation links into native PDF content under shared archive, resource, and output budgets
  • Import and write JPEG, bitmap, TIFF, JPEG2000, JBIG2, WMF, and EMF oriented image workflows, with encoded image XObject reuse, image-mask and soft-mask transparency helpers, per-image JPEG quality overrides, per-call EMF/WMF rendering options, frame clipping, hatch-brush pattern preservation, and opt-in automatic monochrome compression selection
  • Add metadata, annotations, popup comments, hyperlinks, attachments, viewer preferences, all six standard page layouts including two-page cover spreads, print behavior, layers, and page transitions
  • Annotation support for highlights, free text, links, file attachments, popups, redaction, watermark, rich media, 3D / U3D / PRC, border styles, linked comment popups, and the full Line / PolyLine / Polygon extras family (caption, line endings, intent, border effect)
  • Named destinations, page thumbnails, page-level outline styling (color, bold, italic), and a document-level named JavaScript registry
  • Generated-document navigation metadata: THotPDF.SetPageLabel and the decimal / roman / alphabetic helpers write catalog /PageLabels ranges through THPDFPageLabelStyle, while RegisterArticleThread plus THPDFPage.AddArticleBead emit article thread dictionaries and bead chains
  • THPDFActionBuilder spans document lifecycle, page, form, annotation, layer, multimedia, transition, 3D-view, and GoToE embedded-navigation actions with ordered /Next chains, while the loaded action graph API safely inspects all 18 standard action types
  • Catalog document lifecycle /AA /WC, /AA /WS, /AA /DS, /AA /WP, and /AA /DP additional actions through THotPDF helpers, plus page-level /AA /O and /AA /C triggers through THPDFPage.SetPageAdditionalAction and THotPDF.SetPageAdditionalAction, each with matching clear helpers
  • Tagged PDF structure trees with role maps, StructParents, ParentTree output, the Table 333 standard structure-type enum (THPDFStandardStructureType), an AddStructureElement typed overload, and /Lang / /Alt / /ActualText / /E properties on BeginTaggedContent
  • OutputIntents, ICC profiles, page boxes, rotation, UserUnit, Tabs order, tiling patterns, ExtGState alpha, blend modes, inline images, multi-stop axial and radial gradients, Gouraud-shaded triangle meshes, Coons and tensor-product patch meshes, and soft-mask images for PNG-style per-pixel alpha
  • The opt-in LinearizeOutput writer adds fast web view output with a first-page dependency section, shared-object grouping, primary page and shared-object hint tables, and an early compatibility cross-reference table while retaining direct file and stream destinations
  • Inspect layout visual diagnostics with bounded overlap detection, element paths, opt-in source mapping, native vector overlays, statistics, and synchronous preview callbacks

Fonts, Shaping, and Text

HotPDF shapes text on the producer side, driven by the font's own OpenType tables, and emits the result with standard PDF text operators. Every PDF reader therefore renders identical output, and full /ToUnicode reverse mapping keeps copy and paste recovering the original characters

OpenType GSUB Substitution Engine

Every OpenType GSUB LookupType 1-8 (Single, Multiple, Alternate, Ligature, Contextual, Chained Contextual, Extension, Reverse Chained Contextual) is implemented, with Script / LangSys selection, GDEF parsing, Cmap format 12 SMP coverage, and query helpers such as GetSingleSubstituteGlyph, ApplyLigatureSubstitution, ApplyContextualSubst, and ApplyReverseChainedContextualSubst. MarkUnicodeGlyphUsed pulls every substitute glyph into the subsetter so embedded font subsets stay self-contained

OpenType GPOS Positioning Engine

A GPOS positioning engine covers all 9 LookupTypes: pair, single, and contextual kerning for left-to-right and right-to-left text, mark-to-base, mark-to-mark, and per-ligature-component mark-to-ligature placement, cursive entry/exit attachment, distance positioning, and vkrn / vpal vertical kerning for vertical text output

Complex Script Shaping Coverage

20+ scripts are shaped through the font's own GSUB feature chain: Arabic (including the Supplement, Extended-A, and Extended-B blocks), Syriac, Mongolian, N'Ko, Adlam, Hanifi Rohingya, Tibetan stacking, Devanagari and the other Indic scripts, Javanese, Thai, Lao, Hebrew, Khmer, Myanmar, Tai Viet, and Meetei Mayek. Each script is an opt-in switch, so existing output stays byte-identical until enabled

Automatic Shaping Pipeline

The opt-in ShapingFeatures property and THPDFShapingFeature enum (sfArabicGSUB, sfCursiveAttachment, sfStandardLigatures, sfContextualLigatures, sfContextualAlternates, sfIndicShaping) apply Arabic init / medi / fina / isol, rlig, calt, rclt, GPOS cursive attachment, Latin liga / clig, and Devanagari reordering as text is emitted. Arabic also covers the full U+0672-06D5 joining-class table with LAM-ALEF, YEH-HAMZA, Allah (U+FDF2), and Bismillah (U+FDFD) ligature folding

Automatic OpenType Typography Features

Optional shaping switches apply the font's standard, discretionary, and historical ligatures, small capitals, oldstyle / lining / proportional / tabular figures, superscripts, subscripts, ordinals, fractions, scientific inferiors, numerators, denominators, stylistic and contextual alternates, localized forms, case-sensitive forms, slashed zero, and vertical alternates, with chained substitutions resolved back to the source text in the ToUnicode CMap

Synthetic Codepoints and Capability Surfaces

For GSUB substitute glyphs without a natural Unicode codepoint, AssignSyntheticCodepointForGID and GetSyntheticCodepointForGID allocate Private-Use-Area (U+E000-F8FF) codepoints with mirrored /CIDToGIDMap, /W, and /ToUnicode integration. Latin ligatures use ApplyLatinLigatureRefinement, while GetSyriacJoiningClass, GetMongolianJoiningClass, GetDevanagariCategory, ApplyDevanagariReorder, GetUnicodeGlyphForCodepoint, and GetCodepointAdvance let callers drive emission glyph by glyph

Font Subsetting and CJK PDFs

THotPDF.EnableFontSubsetting subsets TrueType, OpenType-CFF, CID-keyed CFF, and CFF2 fonts while preserving glyph IDs for Type0 / Identity-H text. CJK documents that previously embedded 14 MB CID-keyed CFF programs now ship at 500 KB - 2 MB with no rendered glyphs lost, and optional compact TrueType subsets renumber the kept glyphs so a few CJK characters need only a few kilobytes of font data

Variable and Color Fonts

Built-in TrueType and CFF2 variable-font instancing bakes TrueType gvar outlines and phantom points, CFF2 blends, mapped axes, and horizontal, vertical, and global metrics into a static checksum-correct sfnt before embedding. Color glyphs render from native COLR v1 paint graphs with gradients, transforms, and blend composites, bounded SVG glyph paths and shapes with fail-closed active-content rejection, and closest-strike sbix and CBDT/CBLC bitmaps

Compact Font Output

Embedded font programs are always Flate-compressed, a font used on several pages is embedded once for the whole document, and subset tags are derived deterministically from the glyphs actually used, so repeated runs produce identical output. An optional mode writes plain-ASCII text with standard fonts as compact unembedded WinAnsi text, and a single CompressDocument switch combines compact subsets with Flate compression and object streams

Editing Existing PDFs

Pages, Merging, and Assembly

Load existing PDFs, copy, append, and delete pages or page ranges, merge documents with outline-aware and AcroForm-aware merging, update document information, stamp pages, and transcode loaded streams with compression-level-aware Flate compression or predictor-safe decompression. Destination-wide resource deduplication applies across page imports from multiple documents

Lossless Content-Stream Editing

The THPDFContentStreamAST retains every whitespace byte, comment, delimiter, operand spelling, and inline-image payload while exposing linked operation and container nodes; content operator visitors add bounded inspect, measure, replace, delete, stop, and reject callbacks with validated atomic loaded-page updates, and semantic comparison canonicalizes operands before exact event comparison

Text Replacement and Paragraph Editing

Previewable Unicode text replacement uses embedded fonts, document shaping settings, width policies, wrapping, per-match results, stale-plan detection, and atomic commits, changing only matched operand spans. Bounded paragraph editing reflows selected text across baselines and supported shared Form invocations with collision reports, sealed preview, commit, and rollback

Redaction

Boundary-clipped redaction covers text, paths, images, patterns, inline images, and Form XObjects, and full-rewrite cleanup removes unreachable resources, metadata, attachments, annotations, and prior revisions. Review-first redaction detection combines checksum-aware PII patterns with application-selected entity and face detectors and stages only findings that carry explicit approval and reviewer identity, keeping a separate burn-in boundary

Color Rewrite and Flattening

Loaded-page color rewrite converts selected paint to DeviceGray, DeviceRGB, or DeviceCMYK while keeping ordinary text and paths as searchable vectors. Color-managed transparency flattening produces seam-free lossless tiles with bounded peak working memory, and adaptive mesh-shading and complex-pattern flattening is selected by measured perceptual error

Sanitising and Transactions

SanitiseLoadedDocument applies JavaScript-only, active-content, or strict untrusted-document policies, removes unreachable payload objects, compacts live object numbers, and rewrites in place through atomic file replacement. Nested copy-on-write object graph transactions snapshot each touched indirect root once per savepoint, restore object-number allocation on rollback, and spill large stream history beyond a configurable threshold

Loaded-Document Toolkit and Viewer

Edit annotations and multi-widget form geometry, visibility, rotation, border, and color, activate bare web and email addresses, run stateless next-match search, read typed outline snapshots, and print deterministically with paper capability discovery. VCL viewer components add full-page, region, and pixel-bounded snapshots, adjacent-page prefetch, persistent highlights, rotation-aware marquee selection, and keyboard and wheel navigation

Forms and XFA

AcroForm Creation

  • Text fields, list boxes, combo boxes, check boxes, radio buttons, signature fields, and push-button actions (including Named / Hide / Show / ImportData / SubmitForm with user-controlled /Flags), with generated appearance streams for multi-line, comb, rich-text, and CID-font fields
  • Authored text-field UTF-8 WinAnsi appearances across single lines, multiline paragraphs and comb cells, with Unicode scalar-counted password masks and unchanged stored values
  • The full form-field trigger family (/AA /K Keystroke, /F Format, /V Validate, /C Calculate) plus widget mouse, focus, and visibility triggers (/E, /X, /D, /U, /Fo, /Bl, /PO, /PC, /PV, /PI) by field name, with matching clear helpers
  • Multi-Unicode /DR font registration via RegisterAcroFormFont and duplicate field-name guards at creation time

Loaded Forms and Data Exchange

  • HasFormFields and FormFieldExists answer form questions before touching a loaded PDF, field values can be read and written by index or name, and FlattenFormFields burns fields into page content and reports how many it flattened
  • FDF file and stream exchange and XFDF multi-value exchange preserve separate selections in multi-select choice fields, and Windows FDF and XFDF imports select supplied font families and styles while preserving signed or AES-encrypted revisions
  • Calculation and validation actions use a bounded typed expression subset with deterministic UTC dates and allowlisted helpers, while unsupported active scripting fails closed without starting a JavaScript engine; the optional QuickJS runtime bindings run broader application-controlled JavaScript under memory, stack, time, and interrupt limits
  • Native Unicode AcroForm appearances fill single-line fields with embedded TrueType, exact glyph widths, and supplementary ToUnicode, and native typed form no-op publication retains exact bytes for unchanged updates
  • Supplied rich-text font fallback selects complete styled Unicode graphemes from candidate family programs, with the same opt-in through native Linux JSON fallback

XFA Containers and Flattening

  • XFA (XML Forms Architecture) container packets (PDF 1.7 §12.7.6 / §12.7.8) with AddXFAPacket / ClearXFAPackets / XFAPacketCount, plus exact-byte-preserving XDP-stream and packet-array DOM queries and edits
  • XFA-to-AcroForm flattening (ApplyXFAAsAcroForm for raw XDP bytes, FlattenLoadedXFA for a loaded PDF's embedded form) turns static XFA into native AcroForm fields, styling, flow-measured nested layout="tb", wrapped layout="lr-tb", fixed-column and auto-column table rows, and page graphics, so the form stays usable in readers without an XFA engine
  • Legacy XFA radio groups, legacy XFA choice fields, and legacy text, numeric, date and password fields create real Unicode font appearances with repeated-instance scopes and per-field rollback
  • Native XFA list selection windows use embedded-font line metrics to keep selected options visible and save the top index with complete option and value arrays

Dynamic XFA Runtime

  • XFA form scripting extends bounded FormCalc with conditional logic and validated instance callbacks, while an explicitly enabled QuickJS sandbox adds full control flow without exposing file, process, browser, or network objects
  • The interactive dynamic XFA runtime adds host-neutral focus, Unicode editing, hit testing, validation and calculation, atomic rollback, and bounded reflow without flattening; dynamic instance add/remove and presence events persist to XDP output
  • Dynamic XFA instance presentation and dynamic XFA choice items keep repeated data binding, stable identities, live lists, and native appearances consistent across saving
  • Persistent XFA JavaScript sessions, persistent event and script-object handles, dynamic FormCalc Eval, and owned native FormCalc execution retain lexical state with bounded, deterministic transactional rollback
  • Document-owned XFA XML streams keep bounded resident records with native and JavaScript dataWindow navigation, a disk-backed structural journal, record retention, logical-order and neighbor queries, and complete XDP saving that preserves evicted edits
  • XFA host transport supplies typed callbacks for host actions and FormCalc Get/Post/Put, recording responses for safe retries and replay

Security and Digital Signatures

Encryption and Permissions

Apply passwords, AES-128, AES-256, PDF 2.0 AES-256 R6, public-key encryption through caller-supplied PKCS#7 envelopes, metadata-encryption control, protection flags, and permission control. Independent reserved crypt-filter policies cover strings, normal streams, and embedded files, and password copies, derived keys, and plaintext scratch are cleared on every success or failure path

HotPDF writes credential-preserving Standard and public-key encrypted incremental updates that keep stable permanent IDs and byte-exact source prefixes, including authenticated public-key incremental saves with independent string and stream recipient keys

In-Process PFX / PKCS#12 Signing

THotPDF.SignPDFWithPFX(InputPDF, OutputPDF, PFXFile, Password) signs an existing placeholder PDF in a single call. The bundled ASN.1, RSA, AES, and PBES2 PKCS#12 stack signs RSA and ECDSA natively and Ed25519 or Ed448 through optional OpenSSL 3 libcrypto, with SHA-2, SHA3, or SHAKE256 digests, bounded 256 KB copy buffers, and same-stream signing. HPDFEnumeratePFXIdentities, HPDFParsePFXByLocalKeyID, and THPDFCMSSignOptions.PFXLocalKeyID select multi-identity credentials deterministically and carry their matching available certificate chain into CMS. PBES2 unwrapping accepts AES-128 / AES-192 / AES-256 CBC with HMAC-SHA-1 / SHA-256 / SHA-384 / SHA-512 PBKDF2 profiles, plus legacy PBE-SHA1-3DES PFX files

CMS and Signature Verification

Multi-signer CMS containers preserve independent attributes, algorithms, certificates, providers, and validation results, and signers can use issuer-and-serial or compact X.509 SubjectKeyIdentifier identities. Loaded-signature verification supports RSA PKCS#1 v1.5, RSA-PSS, NIST and Brainpool ECDSA, Ed25519, Ed448, SHA-2, SHA3, and SHAKE256, RFC 3161 timestamp tokens, caller-controlled certificate paths, offline OCSP or CRL validation, and machine-readable diagnostics

PAdES Long-Term Validation

PAdES B-B, B-T, B-LT, and B-LTA workflows are covered end to end with SHA-2 or SHA3 RFC 3161 signature and document timestamp verification, append-only archive timestamp renewal with caller-supplied DSS certificate, OCSP, and CRL evidence, exact evidence deduplication across revisions, DSS / VRI validation, caller-supplied trust anchors, Seed Value constraints, ISO 32001 extension declarations, and XAdES-in-PDF. Enterprise edition: DSS / VRI evidence writers, B-LTA document timestamps, and PAdES profile preflight require HotPDF Enterprise (HotPDFEnt)

Signature Policies and Profiles

PAdES signature-policy validation supports PAdES E-EPES policy generation, structured qualifiers, policy-document hashing, and caller pinning, while PAdES profile preflight reports every baseline or extended requirement with clause, CMS, DSS, timestamp, object, and revision evidenceEnterprise

Signing Providers and Remote Signing

Application callback signers plug into the CMS pipeline, and remote, PKCS#11, and Windows CNG key-storage providersEnterprise use the same path. CSC remote signing connects to CSC API v2 services through an application-owned HTTP transport with OAuth refresh, hash-pinned SAD handling, bounded multisign batches, and idempotency keys. Incremental signing jobs fill existing fields while retaining previous signatures

Timestamps and Revocation

Bounded asynchronous timestamp, OCSP, and CRL acquisition supports cancellation and retry policy. Headless RFC 3161 timestamps validate message imprints, nonces, TSA authorization, and revocation evidence, and headless DSS/VRI evidence validates chains and OCSP/CRL freshness before incremental publication, including encrypted documents

PDF MAC and Integrity

Algorithm-agile standalone and signature-attached PDF MAC validates the complete incremental-revision chain with exact failure locations, authenticated permissions, and SHA-2 or SHA-3 policy enforcement. Inconsistent signer, container, key-length, or RFC 6211 algorithm identifiers fail before document hashing or provider work

PDF Standards and Compliance

HotPDF includes version-specific support for the practical PDF 1.3, PDF 1.4, PDF 1.5, PDF 1.6, PDF 1.7, and PDF 2.0 authoring features used by business, imaging, publishing, and document-automation applications. Public APIs are checked against the selected PDF version so generated files avoid newer entries when strict compatibility is required, and version gates can automatically promote the output version or enforce strict conformance through StrictVersionLock

This is broad standards-aware coverage for HotPDF's supported authoring surface, not a blanket claim that every edge case in ISO 32000-1 is implemented

PDF/A, PDF/X, and PDF/UA Conformance

HotPDF gates feature methods against PDF/A-1 / -2 / -3 / -4 / -4e / -4f, PDF/X-1a / -3 / -4, and PDF/UA-1 / -2 profiles, while PDF/A-4 generation runs a bounded object-graph validator before serialization. Calls that would break the selected profile raise diagnostic exceptions instead of silently producing non-conformant PDFs

PDF 2.0 Profiles

PDF 2.0 output supports PDF/A-4, PDF/A-4e, PDF/A-4f, PDF/UA-2, PDF/X-6, PDF/X-6p, and PDF/X-6n identification and validation, with selectable ISO 15930-9:2020 and resolved-errata PDF/X-6 rule sets, actual painted color and overprint checks, clause-aware diagnostics, and transactional PDF/A-4 and PDF/UA-2 repair with byte-exact rollback

Accessibility

Tagged PDF 2.0 tables receive grid expansion, header association, and cycle detection, lists receive numbering and continuation checks, Ruby and Warichu sequences are enforced, and applications can write pronunciation hints or embedded PLS lexicons through SetStructurePronunciation and AddPronunciationLexicon

Preflight ReportsEnterprise

CreatePreflightReport and CreatePreflightReportWithProfile audit a PDF against the supported PDF/A, PDF/X, and PDF/UA checks and emit text, JSON, HTML, CSV, or XML reports with stable namespaced rule identifiers and structured locations. ValidatePDFWithPluginBundle and CreatePreflightMRR combine built-in policies with bounded trusted feature and rule plugins in one deterministic XML MRR. Requires HotPDF Enterprise (HotPDFEnt / Lib\Enterprise)

Validation Policies and E-Invoices

Reusable validation policies combine structural preflight with strict or WTPDF intake requirements and run ordered file batches under bounded worker limits. Factur-X and ZUGFeRD intake cross-checks attachment MIME types, FileSpec names, and XMP namespaces, and built-in e-invoice business-rule validation runs every profile-specific Schematron checkSmall Business

Archival Conversion

Loaded PDF/A-4 preservation retains original text, vectors, images, embedded fonts, and OCR layers while reporting interaction and metadata losses. Loaded PDF/A-4 raster archival conversion rebuilds visible pages as verified sRGB images under resource budgets; this opt-in visual path discards original vector text, signatures, and interactive content

The standards matrix also covers filters and predictors, XRef streams, incremental update chains, Ed25519, Ed448, extension-gated ML-DSA verification, DeviceCMYK and ICCBased color, layers, transparency groups, XMP metadata, OutputIntents, production page boxes, ViewerPreferences, UserUnit, Tabs order, and font embedding for TrueType, Type 3, CFF, OpenType-CFF, and CID-keyed CFF fonts

Text Extraction, OCR, Barcodes, and Comparison

  • Character-level extraction with transformed quadrilaterals, baselines, source clusters, and ligature membership
  • Semantic text extraction with stable column order, table rows, lists, headings, and figure or table captions
  • Missing-ToUnicode recovery from embedded sfnt cmap tables, AGL glyph names, binary CIDToGID maps, and Adobe CID collections; built-in legacy CMaps decode one-to-four-byte character codes, with the complete CMap data notice included for redistribution
  • Structured loaded-page export writes UTF-8 HTML, XHTML, XML, or JSON from one accessible reading model, retaining headings, lists, tables, figures, outlines, page labels, and safe links
  • Typed table extraction builds a canonical grid across fragments and pages, infers locale-controlled numbers, dates, currencies, and percentages with confidence, and writes CSV or JSON atomically
  • Compare contract wording by paragraphs and word or sentence tokens, retain two-sided source positions, detect clause reordering, exclude explicit boilerplate, and create HTML or annotated PDF review outputSmall Business
  • Two-document comparison jobs expose six comparison modes and two-sided contract JSON, HTML and annotated-PDF artifacts
  • Searchable OCR text layers connect an application-selected recognizer to bounded rendering, invert page rotation for aligned invisible text, optionally bind output to one OCG, and commit all pages in one transaction; the SearchableOCR console example shows built-in, RapidOCR, and Tesseract engines
  • The built-in OCR engine recognizes regular, bold, italic, and bold italic ASCII text and omits uncertain words as a whole instead of silently dropping characters
  • The native Tesseract DLL adapter (HPDFCreateTesseractDLLOCREngine) and the local CLI adapter (THPDFTesseractOptions) provide multilingual Unicode recognition, page segmentation modes, confidence, and baselines
  • The RapidOCR local model adapter (THPDFRapidOCROptions) and native RapidOCR DLL adapter (HPDFCreateRapidOCRDLLOCREngine, THPDFRapidOCRDLLOptions.ForLanguage) run ONNX models offline for Chinese, Japanese, Korean, Latin, Russian, Arabic, and Hindi text
  • Scan preprocessing and structured OCR adds orientation detection, deskew, border cleanup, perspective rectification, and semantic text output; JSON and C ABI OCR jobs expose the external engines through explicit settings
  • Loaded-page barcode decoding renders pages or regions in bounded slices for pluggable decoders, with built-in Code 39, Code 128, EAN/UPC, QR, Data Matrix ECC 200 and PDF417, and maps results back into PDF user space
  • Recognize multiple barcodes in one raster, preserve identical payloads at separate locations, and sample rotated or projective Data Matrix modules

Rendering and Imaging

Loaded-Page Renderer

Bitmap, direct-DC, Form, and display-list replay share one content-token interpreter with per-operator cancellation. Rendering executes colored and uncoloured tiling patterns of all three tiling types (and isolates each cell path), axial, radial, Gouraud, Coons, and tensor-product patch shadings, executable halftones, transfer functions, and black-generation / under-color-removal, with bounded recursion and tessellation for hostile resources

Color Management and Transparency

ICC-based rendering applies source, proof, output, and sRGB pipelines with selectable intent and black-point compensation through a shared transform cache; native rendering intents carry through images and groups. Isolated and knockout groups render through bounded tiles reported by GetLastTransparencyGroupTileStats, and opt-in overprint proofing preserves process plates that a paint does not name, applies /OPM 1 zero-component protection, and combines Separation and DeviceN spot tints

Parallel and Progressive Output

Parallel rendering overlaps display-list compilation with playback; RenderLoadedPagesParallelOrdered, RenderLoadedPageTilesParallel, and RenderLoadedPageBandsParallel stream ordered pages, tiles, or bands with borrowed bitmap lifetimes and report stage telemetry through THPDFParallelRenderPipelineInfo. THPDFLoadedPageRenderSession shows early progressive JPEG scans through THPDFProgressiveJPEGScanEvent and renders only requested regions, while SaveLoadedPageToPng / SaveLoadedPageToPngStream and SaveLoadedPagesToTiffBanded / SaveLoadedPagesToTiffStreamBanded encode without a full framebuffer

Pluggable Backends and Caches

Pluggable loaded-page render backends receive compiled display lists and advertise their capabilities, while the built-in GDI backend preserves existing output. Decoded images, display lists, raster pages, Type 3 CharProcs, and prefetch work use bounded caches with reference-counted bitmap handles; compiled lists expose THPDFPageDisplayList.OperatorCount, and prefetch reports through THPDFLoadedPagePrefetchInfo

JPEG 2000, JBIG2, and CCITT

JPEG 2000 decoding validates codestream tiles, combines region and resolution-of-interest reconstruction, and decodes visible tiles through budget-aware parallel tile reconstruction. JBIG2 segment-graph validation runs before decoding, batch encoding shares one trained global dictionary across pages, and CCITT Group 3 and Group 4 streams decode with bounded damaged-row resynchronization

Large Files and Performance

Multi-Gigabyte Direct File API

The DAOpenFileReadOnly / DACopyFile / DASetDocumentInfo / DASaveAsFile family and the file-to-file EncryptFile / DecryptFile calls work on the PDF file directly instead of building the in-memory object graph. On a 2 GB benchmark document with 1.67 million objects, AES-256 encryption takes about 14 seconds, decryption about 16 seconds, and a full rewrite about 6 seconds; opening a 1.25 GB document for its page count takes milliseconds

Memory-Mapped and Random-Access Loading

Large local files use bounded adaptive memory mapping with a shared LRU cache, reported through THPDFMappedFileStatistics. LoadFromRandomAccessSource connects HTTP range readers and custom storage, coalesces reads, adapts read-ahead, and plans minimal ranges for linearized or later pages without requesting the complete source

Bounded Damaged-PDF Recovery

Relocates intact xref tables or streams after a broken startxref, then falls back to a token-aware 1 MiB chunk scanner that rebuilds direct-object offsets with configurable byte and object budgets, newest-definition precedence, stream-body false-positive filtering, byte-ranged confidence events, and mandatory full rewrite on save

Memory Scheduling

A fair process-wide peak-memory scheduler delays competing loads, renders, and optimization jobs before their working sets overlap. Modified streams switch to compressed temporary storage above LoadedStreamMemoryThreshold, and object-stream members are parsed only when referenced

Stream Filters and Optimization

Loaded stream filters run through a reusable pipeline with strict end markers, decoded-byte ceilings, and cycle detection, and the IHPDFCustomStreamFilter registry adds application-defined decoders under the same budget. Selective optimization combines zlib, Zopfli, and bounded JPEG / JPEG 2000 quality trials, committing only smaller payloads

Hardened Parsing

Parser tokens use a retained block arena, dictionaries and arrays scan immutable spans, and configurable byte, token, container-entry, and malformed-token budgets stop hostile input with typed telemetry. Repeated names, operators, and short strings share a bounded document-scoped pool

Platforms and Integration

Four Report-Engine Adapters

Drop-in PDF backends for FastReport (TfrxHotPDFExport, with the frxHotPDFDesign design-time unit), QuickReport (TQRHotPDFExportFilter), ReportBuilder (TppHotPDFDevice), and DevExpress ExpressPrinting (dxHotPDFExportReportLinkToFile/Stream, covering cxGrid / cxRichEdit / cxScheduler / cxPivotGrid). Existing reports keep working - only the PDF emitter is swapped, with native object output and opt-in PDF/A and PDF/X gates; a VCL TDBGrid table exporter is included

Native Linux C ABI

The versioned native Linux C ABI delivers text, form, PNG and encrypted signing operations through bounded callbacks, with real C and Python clients running on Ubuntu 24.04, Ubuntu 26.04 and Debian 12

Windows C ABI and JSON JobsEnterprise

HotPDFABI.dll exposes a versioned flat C ABI with layout-checked Win32 and Win64 callbacks, opaque handles, fixed status codes, and cancellation; build-HotPDF-ABI.cmd builds it for each platform. JSON and C ABI document operations share rendering, text and forms, OCR, redaction, signing, and PDF/A-4 conversion through a versioned schema with atomic output

Free Pascal and Lazarus

Full-source Free Pascal builds require FPC 3.2.2 or later on every platform (Trial precompiled Win32 and Win64 units require the official default Free Pascal 3.2.2 release). FPC native backends provide TIFF, JPEG/JPX, ICC, JBIG2, and Zopfli through a validated Windows codec bridge, together with parallel page, tile, band, and JPEG 2000 tile rendering

Diagnostics and Quality Assurance

  • THPDFLogger and the global HPDFLog provide a runtime-toggleable diagnostic facade with Error / Warning / Info / Debug filtering, file, OutputDebugString, and console targets, thread safety, 10 MB rollover, and a zero-overhead disabled path
  • Unified operation telemetry separates scheduler queue delay, wall and CPU time, retained memory, process I/O, cache activity, and decode expansion
  • Bounded deterministic replay logs capture cancellation checkpoints, range availability, and callback outcomes so intermittent behavior can be reproduced
  • Deterministic differential regression probes compare engines across parse, render, text, and save domains and emit the hotpdf.differential.v1 JSON schema
  • The native statistical performance regression harness records warmups and 30 raw samples with p50, p95, RSS, and process I/O, failing against versioned JSON thresholds
  • Continuous malformed-PDF corpus storage re-minimizes failures and publishes SHA-256-addressed hotpdf.corpus.case.v1 cases atomically

Implemented profiles have documented automated controls; acceptance applies to the tested compiler, source composition, platform and behavior identified in each record. The capability completion plan tracks remaining capability and integration boundaries

High-Performance Compression and Imaging Stack

HotPDF uses zlib-ng in zlib-compatible mode for the bundled Flate backend; page streams, embedded fonts, ToUnicode CMaps, Flate images, TIFF output, and FlateDecode helpers all route through the HotPDF zlib layer. Win64x builds include runtime CPU dispatch for SSE2 through AVX2 paths with generic fallbacks, and Win32 uses the generic zlib-ng OMF object set

Standard JPEG workflows use the bundled libjpeg-turbo 3.1.90 object set through the libjpeg-compatible API in HPDFJpeg.pas, with NASM SIMD objects on Win32, Win64, and Win64x; the same backend serves JPEG-compressed TIFF. The C runtime bridge in HPDFCLibs.pas provides 32-byte aligned allocation for SIMD-friendly buffers

Reproducible object build scripts are included: Lib\thirdparty\build-bcc32.bat, Lib\thirdparty\build-bcc64x.bat, and Lib\thirdparty\build-vc64.bat for the full native C library set, plus zlib-ng-only scripts for focused rebuilds

Quick Start

Delphi

program HelloHotPDF;

uses
  System.SysUtils,
  HPDFDoc;

var
  PDF: THotPDF;
begin
  PDF := THotPDF.Create(nil);
  try
    PDF.AutoLaunch := False;
    PDF.FileName := 'HelloHotPDF.pdf';
    PDF.Compression := cmFlateDecode;
    PDF.EnableFontSubsetting := True;
    PDF.BeginDoc;
    PDF.CurrentPage.SetFont('Arial', [], 18);
    PDF.CurrentPage.TextOut(50, 50, 0, 'Hello HotPDF');
    PDF.EndDoc;
  finally
    PDF.Free;
  end;
end.

C++Builder

#include <vcl.h>
#include "HPDFDoc.hpp"
#pragma hdrstop

int main()
{
  THotPDF* PDF = new THotPDF(NULL);
  try
  {
    PDF->AutoLaunch = false;
    PDF->FileName = "HelloHotPDF.pdf";
    PDF->Compression = cmFlateDecode;
    PDF->EnableFontSubsetting = true;
    PDF->BeginDoc();
    PDF->CurrentPage->SetFont("Arial", TFontStyles(), 18, 0);
    PDF->CurrentPage->TextOut(50, 50, 0, L"Hello HotPDF");
    PDF->EndDoc();
  }
  __finally
  {
    delete PDF;
  }
  return 0;
}

Package Contents

Ready-to-use Delphi and C++Builder package projects cover current RAD Studio generations, including 13.1 Florence

Typical Use Cases