HotPDF 2.806.0 dành cho Delphi và C++Builder

Job JSON và C ABI xuất các trang đã nạp thành HTML, XHTML, XML, hoặc JSON ngữ nghĩa và bảng có kiểu thành CSV, JSON, hoặc XLSX, với xử lý theo trang được chọn, đầu ra có giới hạn, hủy, và bảo toàn nguồn

Hướng dẫn chọn demo · Ví dụ Delphi · Ví dụ C++Builder

Registry quy tắc hóa đơn có phiên bản hỗ trợ xác thực XML CII tường minh và hóa đơn lai với các lớp hồ sơ và quốc gia riêng biệt, bao gồm tài nguyên XRechnung và CTC Pháp chính thức qua một engine Saxon do host cấu hình

Tạo, chỉnh sửa, ký PDF gốc, đầu ra nhận biết tiêu chuẩn, tối ưu hóa phông chữ, và xử lý hình ảnh cho các ứng dụng RAD Studio

HotPDF cho phép các ứng dụng VCL tạo, sửa đổi, bảo mật, ký, tối ưu hóa, nhập, nén và lưu tài liệu PDF trực tiếp từ mã Delphi hoặc C++Builder mà không cần triển khai thời gian chạy PDF bên ngoài

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 with duplicate field-name guards, annotations, creation-time AcroForm field wrappers, reusable action-builder chains for open actions, document lifecycle actions, page additional actions, annotation actions, annotation additional actions, AcroForm additional actions, encryption, signing workflows, font optimization, and stream-based workflows from a single native API surface

The loaded-document toolkit adds page-range deletion, outline-aware and AcroForm-aware merging, multi-widget form constraint, geometry, visibility, rotation, border, and colour editing, complete annotation editing, automatic activation of bare web and email addresses, stateless next-match search, complete typed outline snapshots, Windows certificate-store signing, deterministic collated printing with paper capability discovery, full-page, bounded-region, and pixel-bounded Viewer snapshots, cache-aware adjacent-page prefetch, persistent page highlights, rotation-aware marquee selection, current-view printing, keyboard and wheel navigation, and VCL viewer components

Recent library releases expanded HotPDF from a classic PDF writer into a broader native PDF toolkit covering version-specific PDF 1.3 / 1.4 / 1.5 / 1.6 / 1.7 feature gating, native PDF 2.0 output, PDF/A-1 / -2 / -3 / -4 + PDF/X-1a / -3 / -4 + PDF/UA-1 / -2 standards conformance, PAdES baseline / extended / long-term-validation digital signatures, an in-process PFX / PKCS#12 signing pipeline with native RSA and ECDSA plus optional OpenSSL 3 Ed25519 and Ed448, credential-preserving Standard and public-key encrypted incremental updates with stable permanent IDs, rotating modification IDs, byte-exact source prefixes, and byte-exact no-op saves, CFF / OpenType / CID-keyed CFF font subsetting, and PDF export adapters for FastReport, QuickReport, ReportBuilder, and DevExpress ExpressPrinting that route their existing reports through HotPDF as a single PDF backend. A Direct File API processes multi-gigabyte, million-object PDFs file-to-file - page counts, copies, document-information rewrites, and AES-256 encryption or decryption - in seconds, while the bounded recovery loader can relocate a valid xref section or rebuild direct-object offsets after damaged startxref and xref data without trusting nested object-like text or binary data, and publishes byte-ranged recovery events with explicit confidence levels

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

Loaded stream filters run through a reusable pipeline whose final stage writes directly to caller-owned streams and whose intermediate stages spill through independently compressed blocks and a bounded asynchronous batch queue, with strict ASCII85 and ASCIIHex end markers, independent per-chain and document-wide decoded-byte ceilings, filter-count and pipeline-depth limits, indirect-reference cycle detection, same-stream recursion rejection, and structured diagnostics for every success or failure

Predictor encoding now exposes strict reusable TIFF and fixed or adaptive PNG paths for packed, 8-bit, and 16-bit rasters; loaded images can copy native or generically decoded payloads directly to caller streams, while selective optimization uses memory-to-disk spill buffers, a deterministic four-strategy zlib baseline followed by budgeted Zopfli block splitting, and bounded parallel image jobs that commit only smaller payloads in source order

Loaded JPEG and JPEG 2000 recompression can run bounded quality trials and select a deterministic output by jointly scoring sampled perceptual error and relative encoded byte cost, subject to explicit visual-error and minimum-savings limits

Large local documents use bounded windowed memory mapping with a shared LRU cache for parser reads and immutable lazy stream ranges, while mapping thresholds and window geometry remain configurable and failures fall back automatically; raw compressed ranges, decoded images, compiled display lists, and rendered raster pages have independent entry-count, total-byte, and per-entry admission limits, combine recency with aging fixed-memory frequency admission to resist scan pollution, and expose occupancy, traffic, and frequency statistics; a fair process-wide peak-memory scheduler delays competing document loads, renders, stream optimisation, and parallel image optimisation before their main working sets overlap, while preserving cancellation and reporting admission pressure; unencrypted stream serialization and caller-directed transfers write memory, mapped-file, lazy-file, adaptive-cache, and range-cache bytes without an intermediate full-stream copy; short-lived parser tokens and buffers use a retained block arena across loads, simple dictionaries and arrays scan immutable spans with direct numeric conversion and single-pass nesting, configurable byte, aggregate-token, container-entry, and malformed-token budgets stop hostile input with typed telemetry, dictionary keys no longer require temporary name objects, and repeated names, content operators, and immutable short strings share a bounded document-scoped pool; modified loaded streams use LoadedStreamMemoryThreshold to select memory or an owned compressed temporary stream whose raw and compressed blocks share a bounded asynchronous write queue; object-stream members are indexed by object number and parsed only when referenced, while LoadFromRandomAccessSource connects HTTP range readers and custom storage, coalesces adjacent reads through a bounded cache, adaptively grows asynchronous read-ahead during sustained forward parsing, suppresses speculative transport after random jumps, cooperatively cancels in-flight work for foreground seeks, recovers password keys from bounded trailer, xref, document-ID, and encryption-dictionary ranges without requesting the complete source, captures exact binary security-handler entries from the authoritative object offset so delayed decryption needs no source reread, exposes the first linearized page from its self-contained prefix, and plans bounded minimal bootstrap, hint, page, shared-object, and cross-reference ranges for any later page while accepting legal short reads and both interoperable and Annex F hint layouts under strict memory and structure limits

Mapped local files now adapt within the configured byte cap: sustained forward reads use larger views to reduce remapping, sustained distant or backward reads retain up to 16 smaller MRU views, mode changes require repeated evidence, and THPDFMappedFileStatistics reports active geometry, peak mapped bytes, access-pattern counts, and transitions

HotPDFABI.dll exposes a versioned flat C ABI with layout-checked Win32 and Win64 callback structures, validated opaque handles, fixed status codes, 64-bit random-access reads directly into parser buffers, retryable streamed writes, explicit byte lengths, cancellation, progress, and diagnostics; build-HotPDF-ABI.cmd produces the DLL and import library for each platform

Các thao tác tài liệu JSON và C ABI dùng chung khả năng khám phá tính năng, dựng ảnh, văn bản Unicode và biểu mẫu, lớp OCR, xóa dữ liệu, ký PFX, và chuyển đổi lưu trữ raster PDF/A-4 có giới hạn qua một schema có phiên bản, ngân sách tài nguyên, rollback callback, và đầu ra tệp nguyên tử; các yêu cầu lưu trữ chấp nhận tường minh việc mất thông tin và bảo toàn nguồn đã nạp

Backend native FPC cung cấp TIFF, JPEG/JPX, ICC, JBIG2, và Zopfli qua một bridge codec Windows đã xác thực, cùng dựng trang song song thực thụ, trang có thứ tự, tile, dải, và tile JPEG 2000

Deterministic differential regression probes compare named engines across parse, render, text, and save domains, repeat each result to detect instability, isolate exceptions, enforce input and output bounds, provide built-in SHA-256 HotPDF fingerprints, and emit the ordered hotpdf.differential.v1 JSON schema

The native statistical performance regression harness isolates Win32 and Win64 load, save, render, and extraction workloads, records warmups plus 30 raw samples with p50, p95, sample variance, RSS, process I/O, deterministic fixture identity, and environment metadata, and fails against versioned JSON thresholds

Continuous malformed-PDF corpus storage revalidates and re-minimises every failure case under configurable bounds, keeps the smallest signature-equivalent input across runs, serialises competing writers with a process-safe lock, and atomically publishes SHA-256-addressed PDF and hotpdf.corpus.case.v1 metadata files

Unified operation telemetry separates scheduler reservation and queue delay, wall time from current-thread CPU time, portable component-retained memory from sampled process working set, and encoded input from final decoded output, while also reporting peak additional live allocations, process I/O byte deltas, cache activity, aggregate filter work, and decode expansion

Bounded deterministic replay logs capture cancellation checkpoints, random-access range availability, and boolean or integer callback outcomes in an ordered JSON schema; strict replay validates every event signature and substitutes recorded decisions so intermittent external timing and callback behaviour can be reproduced without changing document operations

Revision-aware loading now validates xref free lists and generation transitions while retaining bounded details for duplicate and shadowed object definitions; destructive incremental edits merge existing and newly freed objects into a complete deterministic free chain, advance generations with saturation, preserve dirty-object generations, and expose rebuild statistics; explicit clean, dirty, released, and must-write object states support low-memory post-save object-stream cache release, while deterministic dictionary order, streaming versioned object graph JSON snapshots and incremental updates, editable QDF diagnostic output with bounded stream-length and xref repair, bounded dependency edges, and dominator-based retained-memory attribution make structural inspection reproducible

Các lớp văn bản OCR tìm được nối một recognizer do ứng dụng chọn vào việc dựng trang có giới hạn, xác thực độ tin cậy, hình học Unicode và pixel, đảo chiều xoay trang để văn bản vô hình thẳng hàng, tùy chọn gắn đầu ra vào một OCG, và cam kết mọi trang đã chọn qua một giao dịch đồ thị; các lớp OCR HotPDF đã đánh dấu có thể được thay thế an toàn sau khi lưu rồi nạp lại, các từ Latin và Cyrillic kề nhau nhận dấu cách Unicode tường minh, và ví dụ console SearchableOCR tạo các mẫu scan và chuyển đổi các trang đã chọn với engine OCR tích hợp sẵn, RapidOCR, hoặc Tesseract DLL/CLI, các giới hạn cấu hình được, và thống kê chuyển đổi

Engine OCR tích hợp sẵn nhận dạng văn bản ASCII thường, đậm, nghiêng, và đậm nghiêng, kể cả chữ bạc màu và chữ sáng trên trang nền tối chiếm đa số; từ có glyph còn giữ lại không chắc chắn bị bỏ nguyên cả từ để tránh mất lặng lẽ ký tự, các trang trắng hoặc không nhận dạng được vẫn hoàn tất thành công, và Windows FPC bảo toàn pixel đầu vào 24-bit lẫn 32-bit

Adapter DLL native Tesseract tùy chọn cung cấp phân đoạn trang và chế độ engine cấu hình được, nhận dạng Unicode đa ngôn ngữ, độ tin cậy, biên từ, và baseline qua HPDFCreateTesseractDLLOCREngine trong các build Delphi, C++Builder, và Windows FPC/Lazarus

Adapter CLI Tesseract cục bộ còn nhận THPDFTesseractOptions cho các bố cục một dòng, một từ, văn bản rải rác, và khối dọc, với chế độ engine, timeout, và giới hạn pixel đầu vào tường minh; adapter DLL native dùng hướng baseline để độ dài từ dọc không làm phồng kích thước văn bản tìm được

Adapter mô hình cục bộ RapidOCR bổ sung đường dẫn mô hình ONNX tường minh, phân loại góc nghiêng tùy chọn, từ điển và font cục bộ, điều khiển thread CPU, preflight ngoại tuyến, khoảng cách dòng nhận dạng chính xác, và nhận dạng Unicode có giới hạn qua THPDFRapidOCROptions trong các build Delphi, C++Builder, và Windows FPC/Lazarus

Adapter DLL native RapidOCR giữ các mô hình ONNX CPU trong tiến trình và nhận dạng snapshot bộ nhớ qua HPDFCreateRapidOCRDLLOCREngine, với các preset THPDFRapidOCRDLLOptions.ForLanguage cho tiếng Trung giản thể và phồn thể, tiếng Anh, tiếng Nhật, tiếng Hàn, tiếng Nga, các ngôn ngữ Latin thông dụng, tiếng Ả Rập, và tiếng Hindi, các bộ mô hình cục bộ đã được xác thực, thứ tự đọc ngang, phân loại góc nghiêng tùy chọn, văn bản Unicode, đầu ra có giới hạn, và hủy hợp tác trong các build Delphi, C++Builder, và Windows FPC/Lazarus

Các adapter Tesseract và RapidOCR cục bộ tùy chọn cung cấp OCR tiếng Trung có thể hủy với đường dẫn executable và mô hình tường minh; engine tích hợp sẵn vẫn là mặc định, còn các engine ngoài, package Python, mô hình, và font Arial cục bộ mà RapidOCR đòi hỏi phải được cấp phát riêng

OCR xác thực mã hóa TSV cục bộ và các hợp đồng tensor phát hiện native trước khi dùng kết quả, tính các từ bị loại vào giới hạn nhận dạng xuyên trang, và dừng nguyên tử khi ngân sách còn lại không đủ cho một trang đủ điều kiện khác

SetLoadedFreeTextPlainText explicitly replaces a supported loaded FreeText annotation's appearance with left-aligned ASCII Helvetica text for rewrite or incremental saving, while SetLoadedAnnotationContents changes only its stored contents

SetLoadedFreeTextText dựng lại appearance FreeText Unicode và rich text đã nạp với font nhúng, xuống dòng, căn lề, opacity, xoay, và xử lý overflow nguyên tử; SetLoadedFreeTextRichText nay cập nhật cả appearance hiện hình lẫn nội dung đã lưu

Loaded-page barcode decoding renders a complete page or media-box-contained region in progressive bounded slices, lends each original or quarter-turn raster to an application-selected decoder, validates Unicode, raw bytes, confidence and bounds, reverses raster and page rotations into PDF user space, and deduplicates overlapping payloads

Review-first redaction detection combines checksum-aware built-in PII patterns with application-selected entity and face detectors, maps every accepted span or raster rectangle into PDF page space, starts every finding as pending, and atomically stages only findings carrying both explicit approval and reviewer identity without burning in content

Loaded-page colour rewrite converts selected paint to DeviceGray, DeviceRGB, or DeviceCMYK, retains ordinary device-colour text and paths as searchable vectors, renders images, Forms, patterns, shadings, transparency, ICC, and Type 3 colour through one lossless process image when required, preserves spot-bearing pages by default, and commits the complete bounded batch atomically

Structured loaded-page export writes selected pages as UTF-8 HTML, XHTML, XML, or JSON from one accessible reading model, preferring tagged order and retaining document language and title, headings, lists, tables, figures, alternatives, outlines, page labels, safe links, annotations, and non-sensitive form controls under atomic cancellation and byte budgets

Typed table extraction converts detected table geometry into a public canonical grid, joins compatible fragments and adjacent pages, marks repeated headers and merged column spans, infers locale-controlled integer, number, boolean, date, date-time, currency, and percentage values with confidence, and writes bounded CSV or metadata-rich JSON atomically

Optional document handlers recognise XPS, EPUB, and CBZ from inspected content, preserve fixed-page, spine, or natural image order, convert XPS abbreviated paths and property-element solid, multi-stop linear, or elliptical radial gradient brushes to native PDF vectors and shading patterns, fill paths from cached package JPEG, PNG, TIFF, or JPEG XR ImageBrush resources with bounded viewbox and viewport mapping, brush-local transforms, native repeated or reflected image patterns, and PNG soft-mask alpha, apply solid, gradient, or image Path.OpacityMask values through folded alpha or shared DeviceGray transparency groups, composite overlapping Canvas descendants once through isolated DeviceRGB groups for Opacity and Canvas.OpacityMask, compile inline or resource-backed XPS VisualBrush trees into reusable Form XObjects and bounded tiling patterns, map bounded transformed and structured Canvas.Clip geometry to nested native PDF clipping paths, preserve bounded XPS Glyphs clusters, exact package font programs and glyph IDs, explicit advances, offsets, RTL origins, opacity, resource reuse, Unicode extraction, transformed HTTP, HTTPS, mail, package-page, and LinkTarget navigation through clipped native PDF annotations, inherit Canvas-scoped navigation through descendant visuals with nested overrides, emit positioned TJ runs, enforce shared archive, resource, reflow, page, link, URI, geometry, group-content, pixel, output, and cancellation budgets, and reuse one immutable PDF cache for atomic export and rendering

CSC remote signing connects the existing CMS provider pipeline to CSC API v2 services through an application-owned HTTP transport, with OAuth refresh, credential-chain discovery, exact hash-pinned SAD handling, bounded ordered multisign batches, synchronous or asynchronous signing, bounded polling, RFC 3161 timestamps, cancellation, SHA-256 content-addressed idempotency keys, and a finite completed-operation cache

Nested copy-on-write object graph transactions snapshot each touched indirect root once per savepoint, preserve root addresses during rollback, restore object-number allocation, remove appended roots, spill large stream history beyond a configurable threshold, and expose resident and file-backed snapshot statistics

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

Loaded-page rendering executes coloured and uncoloured tiling patterns plus axial, radial, free-form and lattice Gouraud, Coons patch, and tensor-product patch shadings for fills and strokes, honours pattern matrices in the parent content default coordinate system, supports all three tiling types and signed steps, isolates each cell path, applies uncoloured base tints to fill and stroke operations, and bounds recursive pattern depth, tile execution, mesh decoding, and adaptive tessellation for hostile resources

Production bitmap, direct-DC, Form and display-list replay now share one content-token interpreter with per-operator cancellation; compiled display lists cache operator indexes for operand-scan-free replay and expose the command count through THPDFPageDisplayList.OperatorCount and THPDFDisplayListInfo.OperatorCount, while the renderer retains its complete graphics and resource state machine

Isolated and knockout transparency groups render through bounded 768-pixel tiles with absolute device-coordinate continuity, tile-local alpha and soft-mask storage, single-pass Form decoding and tokenisation, deterministic nested-group state restoration, and peak working-set statistics available through GetLastTransparencyGroupTileStats

Opt-in overprint proofing preserves process plates that a paint does not name, applies /OPM 1 zero-component protection for DeviceCMYK, treats DeviceGray as the black process plate, and combines Separation and DeviceN spot tints through their alternate colour transforms

Repeated Type 3 glyphs reuse bounded CharProc display lists keyed by font, glyph, linear matrix, and colour state, avoiding repeated stream decoding and tokenisation while preserving translation, clipping, nested resources, d0/d1 colour rules, and recursion limits

Progressive loaded-page sessions decode eligible progressive DCTDecode images one scan per bounded continuation for earlier visible previews, expose scan and image counters through THPDFLoadedPageRenderSession, and provide cancellable THPDFProgressiveJPEGScanEvent notifications while retaining the complete-image fallback for unsupported paint state or decoding failures

Progressive region sessions allocate only the requested user-space window, retain graphics and text state across bounded continuations, use conservative display-list bounds to cull unrelated paths, text, images, Forms, and shadings, and expose visible and culled paint counts for telemetry

JPEG 2000 decoding validates individual codestream tiles, combines source-region and resolution-of-interest reconstruction, and concurrently decodes independent visible tiles with private codec state, cancellation, CPU and user worker limits, deterministic composition, and automatic peak-memory budget fallback

Loaded-image cache hits now return immutable reference-counted decoded bitmap handles that survive eviction and document destruction, support thread-safe direct drawing, preserve isolated mutable copies on demand, and eliminate repeated pixel copies from renderer warm paths

Parallel loaded-page rendering now overlaps display-list compilation with playback across dynamically balanced workers, compiles unrelated pages outside the cache lock, begins output before the full input set is compiled, preserves input order, and reports stage concurrency, cache use, completion, and latency telemetry through THPDFParallelRenderPipelineInfo; RenderLoadedPagesParallelOrdered adds calling-thread callbacks with a bounded completed-bitmap queue, ordered-window backpressure, cooperative callback cancellation, and borrowed bitmap lifetimes for jobs whose complete raster output must not remain resident

Both parallel page APIs now use the process-wide peak-memory scheduler to reduce requested workers from conservative page estimates, reserve every claimed page, delay work fairly under pressure, and report memory-derived concurrency, peak reserved bytes, admissions, delays, and wait time; ordered callbacks keep output reservations active until bitmap release so queued rasters and active workers share one budget

RenderLoadedPageTilesParallel and RenderLoadedPageBandsParallel stream one page through isolated workers with row-major tile or top-to-bottom band delivery, borrowed bitmap lifetimes, cooperative cancellation, caller-controlled in-flight memory, and a bounded immutable cache for Type 3 glyph token sequences and halftone threshold screens

SaveLoadedPageToPng, SaveLoadedPageToPngStream, SaveLoadedPagesToTiffBanded, and SaveLoadedPagesToTiffStreamBanded feed the same band renderer into streaming PNG or TIFF encoders, emitting compressed rows without a complete framebuffer and reporting band, row, worker, memory, output, timing, and cancellation telemetry

Pluggable loaded-page render backends receive compiled display lists and document resource access, advertise concurrency and colour-management capabilities, participate in synchronous and parallel rendering, invalidate stale raster caches when replaced, and expose deterministic failure, fallback, and execution statistics; the built-in native GDI backend preserves existing output without claiming device acceleration

Loaded-page prefetch now compiles and renders outside the cache lock with cooperative cancellation checkpoints, yields immediately to foreground page rendering, and reports request progress, cache use, failures, preemption counts, and cancellation latency through THPDFLoadedPagePrefetchInfo

JBIG2 segment-graph validation now checks both image and global streams before native or external decoding, rejects malformed dependencies and invalid embedded organization within explicit segment, edge, depth, and symbol budgets, and prevents invalid shared dictionaries from entering the globals cache

JBIG2 batch encoding now trains symbols across the complete page set through the external static backend, shares one global dictionary across every image XObject, collapses exact duplicate pages, falls back to the native accumulator when allowed, and publishes backend, size, symbol, and budget telemetry

ICC-based vector and image rendering applies complete source, proof, output and sRGB colour pipelines with selectable rendering intent and black-point compensation, while a thread-safe bounded LRU cache reuses transforms across document and renderer instances

Loaded-image recompression and effective-DPI downsampling retain calibrated output definitions, while transparency flattening emits calibrated RGB and preserves Separation or DeviceN pages as vector content instead of discarding spot-colour identity

Loaded AcroForm calculation and validation actions can use a bounded typed expression subset with booleans, numbers, strings, null, undefined, arrays, conditional and short-circuit operators, deterministic UTC dates, and allowlisted string, array, conversion, and Math helpers, while unsupported active scripting fails closed without starting a JavaScript engine

The optional QuickJS runtime bindings execute broader application-controlled JavaScript through either static objects or an ABI-neutral bridge DLL on Win32 and Win64, with configurable memory, stack, script, time, and interrupt limits plus explicit status and recovery semantics

XFA form scripting extends bounded FormCalc with conditional logic, repeated numeric arrays, and validated instance callbacks, while an explicitly enabled QuickJS sandbox adds full control flow and native typed arrays without exposing file, process, browser, or network objects; the interactive dynamic XFA runtime adds host-neutral focus, Unicode editing, hit testing, instance-aware validation and calculation, atomic rollback, and bounded reflow without flattening

SanitiseLoadedDocument applies JavaScript-only, active-content, or strict untrusted-document policies to loaded PDFs, removes unreachable payload objects, compacts live object numbers, and safely rewrites in place through atomic file replacement

Preflight JSON, HTML, and veraPDF-style findings expose stable namespaced rule identifiers and structured PDF locations with logical scope, path, key, and exact object, page, or byte coordinates when available, while text and CSV compatibility remains unchanged

Reusable validation policies now combine structural preflight with strict or WTPDF intake requirements, extract canonical declaration and claim metadata, run ordered file batches through bounded worker and queue limits, preserve source-aware errors, and offer inspect, add-missing, and synchronize modes for XMP repair independently of structural PDF repair

Factur-X and ZUGFeRD intake now cross-checks the primary invoice attachment MIME type and FileSpec names against the EmbeddedFiles and Catalog AF registrations, exposes the decoded MIME type and XMP namespace URI, and rejects mismatched XMP document types or extension namespaces

Built-in e-invoice business-rule validation executes all profile-specific Schematron checks with reviewed XPath 2 compatibility, external code databases, stable rule identifiers, explicit evaluation errors, secure XML parsing, and fail-closed combined verdicts

Chuyển đổi lưu trữ raster PDF/A-4 đã nạp dựng lại nội dung hiển thị của trang thành các ảnh sRGB có giới hạn trong một tài liệu PDF/A-4 vừa được xác thực, chuẩn hóa font, transparency, và màu vẽ qua bộ dựng native nghiêm ngặt; API tệp dàn dựng và phát hành kết quả một cách nguyên tử, còn báo cáo chỉ ra các annotation, biểu mẫu, và tệp đính kèm đã bị loại bỏ. Đường lưu trữ hình ảnh tùy chọn này từ bỏ văn bản vector gốc, văn bản tìm được, chữ ký, và nội dung tương tác

PDF 2.0 output now 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, including revision-aware XMP resolved by namespace URI, transactional PDF/A-4 repair for safe header, trailer, metadata, Catalog, and presentation normalisation with byte-exact rollback and preserved page content, selectable ISO 15930-9:2020 and resolved-errata PDF/X-6 rule sets, actual ICC header and channel checks, document and page output intents, actual painted colour and overprint through content arrays, nested forms, tiling and shading patterns, images, image masks, shadings, Type 3 glyphs, soft masks and annotation appearances, inherited graphics and transparency state, combined fill-and-stroke compositing, CIDFont and CMap relationships, bounded decoded-byte and content-token work, namespace-aware structure elements, document metadata and string checks, optional content, physical annotation ownership, form semantics, structure destinations, outlines, nested page labels, associated-file authoring, inherited production page boxes, clause-aware diagnostics with rule-set provenance, automatic fail-closed generation validation, and transactional PDF/UA-2 repair for namespaces, attributes, lists, tables, Ruby, Warichu, pronunciation, alternate text, language inheritance, heading order, and Artifact tags

Tagged PDF 2.0 tables receive bounded grid expansion, intersection and row-group checks, table-local header association and cycle detection, while lists receive complete numbering and continuation-chain checks; exact Ruby and Warichu sequences are enforced, and applications can write per-element pronunciation hints or ordered embedded PLS lexicons through SetStructurePronunciation and AddPronunciationLexicon

The v2.119.32-51 cycle added producer-side Arabic / Persian / Urdu shaping (LAM-ALEF mandatory ligature, Arabic Presentation Forms-A 9 letters), a feature-complete OpenType GSUB substitution engine covering every LookupType 1-8 with Script / LangSys selection and TTF subsetter closure for substitute glyphs, XFA (XML Forms Architecture) container support (AddXFAPacket / ClearXFAPackets / XFAPacketCount), an AcroForm /AA /K + /F + /V + /C form-field trigger family, multi-Unicode /DR font registration via RegisterAcroFormFont, structure-element accessibility attribute setters (/Lang / /E / /T) with a Table 333 standard structure type enum and AddStructureElement typed overload, and marked-content sequence properties on BeginTaggedContent

The v2.119.52-68 cycle closed the Phase 8 automatic shaping pipeline and broadened script coverage: Arabic Extended-A (including the U+0750-077F Arabic Supplement and U+08A0-08FF Arabic Extended-A) and Persian / Urdu Form-B were extended into the full U+0672-06D5 joining-class table plus 26 new Forms-A mappings, with post-pass folding for LAM-ALEF, YEH-HAMZA + vowel pairs (8 ligatures in U+FBEA-FBFB), the standalone Allah ligature (U+FDF2), and the 22-codepoint Bismillah phrase (U+FDFD). The new opt-in ShapingFeatures property + THPDFShapingFeature enum (sfArabicGSUB / sfStandardLigatures / sfContextualLigatures / sfContextualAlternates / sfIndicShaping) makes the producer emit GSUB-driven font-specific rlig / liga / clig / rclt substitutions automatically, with Latin Standard Ligatures (ff / fi / fl / ffi / ffl / ſt / st via U+FB00-FB06) and Devanagari Indic syllable reordering (Repha + pre-base I-matra) joining the same pipeline. New shaping capability methods for Syriac (GetSyriacJoiningClass / GetSyriacPosition), Mongolian (GetMongolianJoiningClass / GetMongolianPosition), and Devanagari (GetDevanagariCategory / ApplyDevanagariReorder) let callers drive non-Arabic complex scripts through the same GSUB engine. GetCodepointAdvance exposes the cached /W em-fraction for wrap calculations, and AssignSyntheticCodepointForGID / GetSyntheticCodepointForGID let producer emit any GSUB substitute GID (Devanagari cluster shapes, stylistic alternates, CJK variation sequences) through Private-Use-Area codepoints with full /CIDToGIDMap + /ToUnicode + /W integration. Cumulative ToUnicode CMap now ships 35 ligature reverse-mapping entries (8 LAM-ALEF + 18 YEH-HAMZA family + 1 Allah + 1 Bismillah + 7 Latin) so consumer-reader copy / paste produces the source codepoints. Documentation skeletons for ChangeLog now ship in 11 languages (EN / CN / AR / DE / ES / FR / IT / JA / KO / PT / RU) with a language-picker UI; ChangeLog retention limit was raised from 250 to 500 version sections

The v2.152-v2.190 cycle built out a complete OpenType GPOS positioning engine and broadened complex-script coverage. Opt-in shaping options now apply the font's own kerning (pair, contextual, and right-to-left), combining-mark placement (mark-to-base, mark-to-mark, and per-component mark-to-ligature), cursive connection anchors, and vertical kerning for vertical text, all written as standard PDF text operators so any reader renders the same result. Producer-side shaping now covers Arabic (including the Supplement, Extended-A, and Extended-B blocks), Syriac, Mongolian, N'Ko, Adlam, Hanifi Rohingya, Tibetan consonant stacking, Devanagari and the other Indic scripts through the font's Indic feature chain, Javanese, Thai and Lao mark ordering, Hebrew vowel-point ordering, Khmer, Myanmar, Tai Viet, and Meetei Mayek. A family of optional OpenType typography features - 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 - can be applied automatically during text output. Copy, paste, and text search recover the original characters across all shaped output, including ligatures and chained feature substitutions. Font output also became smaller: embedded font programs are always Flate-compressed, a font used on several pages is embedded once per document, subset tags are derived deterministically for reproducible output, and an optional compact mode writes plain-ASCII text with standard fonts as unembedded WinAnsi text

Phạm vi tiêu chuẩn PDF

HotPDF bao gồm hỗ trợ cụ thể theo phiên bản cho các tính năng soạn thảo PDF 1.3, PDF 1.4, PDF 1.5, PDF 1.6, và PDF 1.7 thực tế được sử dụng bởi các ứng dụng doanh nghiệp, hình ảnh, xuất bản và tự động hóa tài liệu; các API công khai được kiểm tra đối với phiên bản PDF được chọn để các tệp được tạo tránh các mục mới hơn khi yêu cầu khả năng tương thích nghiêm ngặt

Ma trận hiện tại bao gồm các bộ lọc và dự đoán, luồng XRef, chuỗi cập nhật gia tăng, mã hóa AES, bảo mật khóa công khai, màu DeviceCMYK và ICCBased, mẫu lát gạch (tiling patterns), bóng trục/hướng tâm/nhiều điểm dừng (axial/radial/multi-stop shadings), hình ảnh nội tuyến, các lớp, nhóm độ trong suốt, chuyển tiếp trang, chú thích, các widget AcroForm, các hook ký bên ngoài, siêu dữ liệu XMP, cây cấu trúc PDF được gắn thẻ (tagged PDF structure trees), OutputIntents, các hộp trang sản xuất, ViewerPreferences, UserUnit, thứ tự các Tab (Tabs order), và nhúng/phân nhóm phông chữ cho các phông chữ TrueType, Type 3, CFF, OpenType-CFF, và CID-keyed CFF

Đây là phạm vi nhận biết tiêu chuẩn rộng rãi cho bề mặt soạn thảo được hỗ trợ của HotPDF, không phải là tuyên bố chung rằng mọi trường hợp biên trong ISO 32000-1 đều được triển khai

Why Choose HotPDF

Custom Stream Filter Pipelines

Registry IHPDFCustomStreamFilter kết hợp các decoder push và pull do ứng dụng định nghĩa với các bộ lọc tích hợp sẵn dưới một ngân sách byte tổng hợp, các hợp đồng seek tường minh, hủy hợp tác, đầu ra tạm được cô lập, trạng thái lỗi có kiểu, và telemetry thực thi

Giải mã RunLength xác thực các run đã mã hóa trước khi giữ đúng kích thước đầu ra đã giải mã, và đọc trước file trực tiếp sẽ vứt bỏ phần làm đầy cache chưa hoàn tất sau các lỗi I/O

Native RAD Studio Fit

Use familiar Delphi and C++Builder projects, packages, streams, forms, and drawing patterns instead of wrapping a separate PDF engine

Modern PDF Features

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

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

Competitive Strengths

The capabilities below are hard technical differentiators for HotPDF versus typical Delphi PDF components. Most competing commercial components either lack these features entirely or are materially weaker in production. Each row maps to a verifiable implementation and a public API surface inside the library

Complete OpenType Shaping + Positioning

A full GSUB substitution engine covering every LookupType 1-8 (Single, Multiple, Alternate, Ligature, Contextual, Chained Contextual, Extension, Reverse Chained Contextual), paired with a GPOS positioning engine covering all 9 LookupTypes (pair / single / contextual kerning, mark-to-base, mark-to-mark, per-ligature-component mark-to-ligature, cursive attachment, distance, vertical vkrn/vpal). All positioning is emitted with standard PDF text operators, so every reader renders identically

Producer-Side Complex Script Shaping

20+ scripts shaped on the producer side, driven by the font's own GSUB feature chain: Arabic (incl. Supplement / Extended-A / Extended-B), Syriac, Mongolian, N'Ko, Adlam, Hanifi Rohingya, Tibetan stacking, Devanagari and the Indic family, Javanese, Thai / Lao mark ordering, Hebrew vowel ordering, Khmer, Myanmar, Tai Viet, Meetei Mayek. Output carries full /ToUnicode reverse mapping so copy / paste recovers the original codepoints

In-Process Signing Stack

ASN.1, RSA, AES, PBES2 PKCS#12 unwrapping with AES-128 / AES-192 / AES-256 CBC and HMAC-SHA-1 / SHA-256 / SHA-384 / SHA-512 PBKDF2 profiles, legacy PBE-SHA1-3DES PFX unwrapping, and CMS SignedData (RFC 5652) are handled inside HotPDF. SignPDFWithPFX signs RSA and ECDSA identities through native code and uses optional OpenSSL 3 libcrypto for Ed25519 or Ed448 PureEdDSA; multi-identity PFX files expose deterministic localKeyId selection and automatically embed the matching available certificate chain with exact DER deduplication, CMS signers can use issuer-and-serial or compact X.509 SubjectKeyIdentifier identities, multi-signer CMS containers preserve independent attributes, algorithms, certificates, providers, and validation results, PAdES signature-policy validation supports explicit policy identifiers, structured qualifiers, policy-document hashing, and caller pinning, and PAdES profile preflight reports every baseline or extended requirement with clause, object, and revision evidence, while loaded-signature verification supports RSA PKCS#1 v1.5, parameter-validated RSA-PSS, NIST and Brainpool ECDSA, Ed25519, Ed448, SHA-2, SHA3, and SHAKE256 digest policies, RFC 3161 timestamp tokens, caller-controlled certificate paths, offline OCSP or CRL validation, and fail-fast machine-readable diagnostics for inconsistent CMS digest algorithms

PAdES Long-Term Validation, End to End

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

Three-Axis Compliance + Preflight

Independent profile gating for PDF/A-1/-2/-3, PDF/X-1a/-3/-4, and PDF/UA-1 simultaneously - non-conformant calls raise diagnostic exceptions instead of silently writing non-compliant PDFs. CreatePreflightReport emits text / JSON / HTML / CSV / XML reports with stable rule IDs and locations, while CreatePreflightMRR adds deterministic bounded feature and validation plugins for custom CI policies

Multi-Gigabyte Direct File API

Operates on the PDF on disk without building the in-memory object graph. On a 2 GB document with 1.67 million objects: AES-256 encryption ~14 s, decryption ~16 s, full rewrite ~6 s; reading the page count of a 1.25 GB document takes milliseconds. Classic xref tables, XRef streams, hybrid-reference files, and incrementally updated documents all stay on the direct path

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, bounded byte-ranged confidence events, and mandatory full rewrite on save

CFF / OpenType-CFF / CID Subsetting

TrueType, OpenType-CFF, and CID-keyed CFF fonts are all subsettable 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; embedded font programs are always Flate-compressed, multi-page fonts embed once per document, and subset tags are deterministic for reproducible output. Compact TrueType subsets tùy chọn đánh số lại các glyph được giữ lại, nên vài ký tự CJK chỉ cần vài kilobyte dữ liệu font, và một công tắc CompressDocument duy nhất gộp chúng với nén Flate và object streams cho đầu ra nhỏ nhất; PDF đã nạp nhận cùng cách xử lý lossless qua CompressLoadedDocument

Unified Runtime Logging Facade

THPDFLogger + the global HPDFLog give a runtime-toggleable diagnostic facade: Error / Warning / Info / Debug severity filtering, simultaneous file + OutputDebugString + console targets, thread-safe, 10 MB single-backup rollover, zero-overhead disabled fast-path. LoadFromFile, preflight reports, and the object-stream fallback path are already wired with structured diagnostics that can be toggled at runtime without rebuilding - an operational capability most competing components lack entirely

Four Report-Engine Adapters

Drop-in PDF backends for FastReport (TfrxHotPDFExport), QuickReport (TQRHotPDFExportFilter), ReportBuilder (TppHotPDFDevice), and DevExpress ExpressPrinting (covering cxGrid / cxRichEdit / cxScheduler / cxPivotGrid). Existing report layouts keep working - only the PDF emitter is swapped, with FastReport native text / image / shape / line / link / barcode output including picture clipping and frames, FastReport design-time palette registration, one-based page range filtering, ReportBuilder native text / vector / image / link / barcode output, and opt-in PDF/A and PDF/X conformance gates across all four report adapters

These are delivered capabilities, not roadmap promises. Every item above is implemented in the current library, compiles cleanly, and passes DUnitX tests plus end-to-end veraPDF validation. When evaluating competing components, ask for proof of full GSUB/GPOS LookupType coverage, an in-process PAdES B-LTA chain, and measured multi-gigabyte encryption throughput

Tính năng cốt lõi

  • Build lõi khả chuyển Linux với file mapping POSIX native, giải mã đối tượng và nội dung PDF, dữ liệu font sfnt dùng chung, nén, mã hóa học, và tuần tự hóa PDF cổ điển; triển khai đầy đủ các thành phần Linux vẫn đang được tích hợp
  • So sánh cách dùng từ của hợp đồng theo đoạn và theo token từ hoặc câu, giữ vị trí nguồn hai bên, phát hiện điều khoản bị đảo thứ tự, loại bỏ boilerplate được khai báo tường minh, và tạo đầu ra soát HTML hoặc PDF có annotation
  • Create PDF files, add pages, draw text, draw vector graphics, and save to files or caller-owned streams
  • Convert and render XPS, EPUB, and CBZ through optional content-scored handlers with bounded archive and conversion work
  • Import HTML5 paged media with a tolerant DOM, print CSS cascade, tables, nested flex/grid business panels, wrapping rows, column spans, images and optional AcroForm controls in parallel boxes, 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, masks, Base 14 text, 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
  • Inspect layout visual diagnostics with bounded overlap detection, element paths, opt-in source mapping, native vector overlays, statistics, and synchronous preview callbacks
  • 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
  • Handle Unicode text, right-to-left text, Identity-V vertical text, script-aware font fallback, unresolved-glyph diagnostics, embedded fonts, TrueType subsets, CFF/OpenType-CFF subsets, text metrics, and paragraphs
  • Apply the font's OpenType kerning, combining-mark positioning, cursive connection, complex-script shaping, and typography features during text output through opt-in shaping options
  • 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
  • Import and write JPEG, bitmap, TIFF, JPEG2000, JBIG2, WMF, and EMF oriented image workflows, with encoded image XObject reuse, image-mask helpers, soft-mask transparency helpers, per-image JPEG quality overrides, per-call EMF/WMF rendering options, canvas layering control, redraw control, frame clipping, hatch-brush pattern preservation, null-pen and null-brush diagnostics, and opt-in automatic monochrome compression selection
  • Decode JPEG 2000 codestream tiles and resolution-of-interest regions through bounded native and crash-isolated paths, with automatic renderer resolution selection and budget-aware parallel tile reconstruction
  • Encode JBIG2 page batches with cross-page symbol training, one shared global dictionary, duplicate-page reuse, bounded input budgets, native fallback, and explicit compression telemetry; decode refinement and aggregate symbol dictionaries and refined text instances through the native Pascal fallback for both arithmetic and standard-Huffman streams, with retained contexts, bounded long-form reference tables, chained global dictionaries, and visible-tile decoding
  • Decode loaded CCITT Group 3 and Group 4 image streams with one- and two-dimensional rows, T.4/T.6 uncompressed extensions, strict EOFB recognition, complete DecodeParms handling, and bounded damaged-row resynchronisation
  • Load existing PDFs, copy pages, append pages, delete pages, merge documents, update information, edit annotation metadata and appearance, stamp pages, inspect, fill, or flatten forms, and transcode loaded streams with compression-level-aware Flate compression or predictor-safe decompression
  • Process multi-gigabyte PDFs through the Direct File API: read page counts, copy, rewrite document information, and apply or remove AES-256 protection file-to-file in seconds, without loading the document object graph
  • Apply passwords, AES-128, AES-256, PDF 2.0 AES-256 R6, public-key encryption, metadata-encryption control, protection flags, and permission control
  • Create AcroForm fields, automatic form appearance streams, signature fields, external CMS signing placeholders, and multi-signature incremental updates

Developer Advantages

  • Source-oriented integration keeps debugging and deployment under your control
  • Shared Delphi and C++Builder examples make it easier to verify behavior in both language stacks
  • Static third-party C library integration keeps compression and imaging dependencies reproducible
  • Focused helper APIs cover PDF filters, bounded TIFF and PNG predictor reversal, strict LZW stream decoding, FlateDecode, CCITT, image masks, barcodes, font subsetting, and page content workflows
  • PDF version gates can automatically promote the output version or enforce strict PDF 1.3/1.4/1.5/1.6/1.7 conformance through StrictVersionLock
  • Ready-to-use Delphi and C++Builder package projects cover current RAD Studio generations, including 13.1 Florence

Recent Library Highlights

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, bounded parsing, sorted edit overlays, and memory or streamed serialization; content operator visitors add bounded inspect, measure, replace, delete, stop, and reject callbacks with deterministic state snapshots and validated atomic loaded-page updates; semantic comparison canonicalizes numbers, strings, inline images, effective matrices, redundant setters, and graphics-state save/restore before exact event comparison; loaded-page text replacement changes only matched operand spans

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. Classic tables, cross-reference streams, hybrid-reference files, and incrementally updated documents all stay on the direct path

Preflight Reports

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. ValidatePDFWithPluginBundle combines the same built-in policies with bounded trusted feature and rule plugins in one deterministic XML MRR

Loaded-Document Form Toolkit

FDF file and stream exchange and XFDF multi-value exchange preserve separate selected items in multi-select choice fields, including option values containing line breaks, and rebuild selection indices when importing

HasFormFields and FormFieldExists answer form questions about a loaded PDF before touching it, loaded field creation rejects duplicate root names before registering widgets, field values can be read and written by index or name, and FlattenFormFields burns interactive AcroForm fields into page content and reports how many fields it flattened - alongside XFA-to-AcroForm flattening that keeps nested, wrapped, fixed-column, and auto-column table XFA forms usable in any reader

In-Process PFX / PKCS#12 Signing

THotPDF.SignPDFWithPFX(InputPDF, OutputPDF, PFXFile, Password) signs an existing placeholder PDF in a single call. File, stream, external-signer, and provider workflows select SHA-256, SHA-384, SHA-512, SHA3-256, SHA3-384, SHA3-512, or the Ed448-required SHAKE256 512-bit digest, copy with bounded 256 KB buffers, seek-patch fixed-width /ByteRange and /Contents fields, and support same-stream signing without retaining a complete second PDF in memory. The ASN.1, AES, and PBES2 PKCS#12 stack accepts RSA, named-curve ECDSA, Ed25519, and Ed448 private keys plus AES-128 / AES-192 / AES-256 CBC with HMAC-SHA-1 / SHA-256 / SHA-384 / SHA-512 PBKDF2; RSA and ECDSA signing use native paths, while Ed25519 and Ed448 signing uses optional OpenSSL 3 libcrypto. HPDFEnumeratePFXIdentities, HPDFParsePFXByLocalKeyID, and THPDFCMSSignOptions.PFXLocalKeyID select multi-identity credentials deterministically and carry their matching available certificate chain into CMS; inconsistent signer, container, key-length, signature-mechanism, or RFC 6211 algorithm identifiers fail before document hashing or provider work

PAdES Long-Term Validation

PAdES B-B, B-T, B-LT, and B-LTA workflows cover SHA-2 or SHA3 RFC 3161 timestamp creation and cryptographic verification, append-only archive timestamp renewal that extends the DSS before sealing the new revision, DSS / VRI long-term validation with offline certificate, OCSP, and CRL evidence, caller-controlled certificate paths, Seed Value constraints, and XAdES-in-PDF

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

Third-Party Report Engine Adapters

Drop-in PDF backends for the four most common Delphi report engines: TfrxHotPDFExport (FastReport 4 / FastReport VCL, including native-object output for text, pictures, shapes, lines, links, and supported barcodes plus page range filtering, font embedding controls, password security, PDF/A or PDF/X gate opt-ins, and the frxHotPDFDesign design-time registration unit), TQRHotPDFExportFilter (QuickReport with PDF/A or PDF/X gate opt-ins), TppHotPDFDevice (ReportBuilder, including opt-in native draw-command output for text, vector primitives, images, links, supported barcodes, and PDF/A or PDF/X gate opt-ins), and dxHotPDFExportReportLinkToFile/Stream (DevExpress ExpressPrinting System covering cxGrid / cxRichEdit / cxScheduler / cxPivotGrid with PDF/A or PDF/X gate opt-ins). Existing reports keep working - only the PDF emitter is swapped

OpenType GPOS Positioning Engine

Opt-in text positioning driven by the font's own GPOS data: pair and contextual kerning for left-to-right and right-to-left text, mark-to-base, mark-to-mark, and per-ligature-component mark placement, cursive entry/exit alignment, distance positioning, and vertical kerning for vertical fonts. Positioning is emitted with standard PDF text operators, so every PDF reader renders the same result

Complex Script Shaping Coverage

Producer-side shaping renders correctly joined and reordered text for Arabic (including the Supplement, Extended-A, and Extended-B blocks), Syriac, Mongolian, N'Ko, Adlam, Hanifi Rohingya, Tibetan, Devanagari and the other Indic scripts, Javanese, Thai, Lao, Hebrew, Khmer, Myanmar, Tai Viet, and Meetei Mayek without relying on a viewer-side shaper. Each script is an opt-in switch, so existing output stays byte-identical until enabled, and copy/paste recovers the original characters

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 automatically during text output, with text extraction mapped back to the source characters

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, shrinking a page of plain text from hundreds of kilobytes to a few kilobytes

Multi-Script Producer Shaping

Producer-side shaping folds Unicode-input runs into their Presentation Forms before PDF text emission. Arabic covers the full U+0672-06D5 joining-class table plus 40+ Forms-A mappings, with automatic ligature post-pass for LAM-ALEF, YEH-HAMZA + vowels (U+FBEA-FBFB), Allah (U+FDF2), and Bismillah (U+FDFD). Capability surfaces for Syriac (GetSyriacJoiningClass), Mongolian (GetMongolianJoiningClass), and Devanagari (GetDevanagariCategory / ApplyDevanagariReorder) let callers drive non-Arabic complex scripts through the same GSUB engine

Automatic Shaping Pipeline (Phase 8)

The opt-in ShapingFeatures property + THPDFShapingFeature enum (sfArabicGSUB / sfCursiveAttachment / sfStandardLigatures / sfContextualLigatures / sfContextualAlternates / sfIndicShaping) elevates the OpenType GSUB and GPOS engines into an automatic producer-side pipeline. Native Arabic init / medi / fina / isol, rlig, calt, rclt, GPOS cursive attachment, Latin liga / clig, and Devanagari Indic reordering happen as text is emitted, with full /ToUnicode reverse-mapping for copy / paste correctness

Latin Standard Ligatures + PUA Synthetic Codepoint

Latin Standard Ligatures (ff / fi / fl / ffi / ffl / ſt / st via U+FB00-FB06) are emitted automatically through ApplyLatinLigatureRefinement when sfStandardLigatures is enabled. For GSUB substitute GIDs without a natural Unicode codepoint - Devanagari cluster shapes, stylistic alternates, CJK ideographic variation sequences - AssignSyntheticCodepointForGID allocates a Private-Use-Area (U+E000-F8FF) codepoint with mirrored /CIDToGIDMap + /W + /ToUnicode integration

OpenType GSUB Substitution Engine

Every OpenType GSUB LookupType 1-8 (Single, Multiple, Alternate, Ligature, Contextual, Chained Contextual, Extension, Reverse Chained Contextual) is implemented as a capability-only query surface (GetSingleSubstituteGlyph, ApplyLigatureSubstitution, ApplyContextualSubst, ApplyReverseChainedContextualSubst, and the Multiple / Alternate / Script / LangSys / Feature helpers). MarkUnicodeGlyphUsed pulls every substitute glyph into the TTF subsetter so embedded font subsets stay self-contained

Page Actions + XFA Forms + AcroForm Triggers + Unicode /DR

PDF document lifecycle additional actions expose catalog /AA /WC, /AA /WS, /AA /DS, /AA /WP, and /AA /DP triggers through builder-based set and clear helpers, while page-level additional actions expose /AA /O open and /AA /C close triggers through THPDFPage and page-indexed THotPDF wrappers. PDF 1.7 §12.7.6 / §12.7.8 XFA container packets ride alongside (or instead of) static /Fields via AddXFAPacket. The full AcroForm form-field trigger family (/AA /K Keystroke, /F Format, /V Validate, /C Calculate) is exposed as wrapper methods, widget mouse, focus, and visibility triggers (/E, /X, /D, /U, /Fo, /Bl, /PO, /PC, /PV, /PI) can now be set by field name, and matching clear helpers keep trigger dictionaries easy to replace. THPDFActionBuilder spans document lifecycle, page, form, annotation, layer, multimedia, transition, 3D-view, and GoToE embedded-navigation actions, while the loaded action graph API safely inspects all 18 standard action types and ordered /Next chains

Page Labels + Article Threads

THotPDF.SetPageLabel and its style-specific helpers write catalog /PageLabels number-tree entries for decimal, roman, and alphabetic page numbering, while RegisterArticleThread plus THPDFPage.AddArticleBead emits article thread dictionaries and bead chains for guided reader navigation

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. TrueType gvar outlines and phantom points, CFF2 blends, mapped axes, and horizontal, vertical, and global metrics are baked into a static checksum-correct sfnt before embedding

Certification Signatures and Field Locks

AddCertificationSignatureField, ConfigureCertificationSignature, and AttachSignatureFieldLock create DocMDP and FieldMDP permission structures with Catalog linkage and field-lock policies, while GetLoadedSignaturePermissions inspects every standard transform method including UR/UR3 usage rights and Identity scopes, AnalyzeLoadedSignatureRevisions classifies later validation, form, signature, annotation, embedded-file, and other changes against the policies reconstructed from the signed snapshot, and SaveIncrementalUpdateAuthenticated authenticates each controlling signature before atomically publishing an allowed revision

Advanced PDF Feature Coverage

  • Version-specific PDF 1.3 / 1.4 / 1.5 / 1.6 / 1.7 + selected PDF 2.0 API gates for Catalog, ViewerPreferences, annotations, JavaScript, Type0 fonts, ToUnicode maps, transparency, layers, and encryption
  • PDF/A-1 / -2 / -3 / -4 / -4e / -4f, PDF/X-1a / -3 / -4, and PDF/UA-1 / -2 conformance gates plus bounded PDF/A-4 structural validation that refuse non-conformant feature calls or output instead of silently violating the profile
  • Tagged PDF structure trees with role maps, StructParents, ParentTree output, and structure elements for accessibility-oriented workflows
  • OutputIntents, ICC profiles, page boxes, rotation, UserUnit, Tabs order, tiling patterns, ExtGState alpha, blend modes, colour-managed luminosity soft masks across ICCBased, Lab, Separation and DeviceN content, executable Type 1 / 5 / 6 / 10 / 16 halftones with independent colour-component screens, compact cached threshold arrays, complete transfer-function arrays, cached sampled functions with every standard packed depth and interpolation order, and black-generation / under-color-removal Function references
  • Inline images, multi-stop axial gradients, radial gradients, free-form and lattice-form Gouraud-shaded triangle meshes, adaptively tessellated Coons and tensor-product patch meshes, soft-mask images for PNG-style per-pixel alpha, and reusable pattern fills
  • Named destinations, page thumbnails, page-level outline styling (color, bold, italic), document-level named JavaScript registry, and the full Line / PolyLine / Polygon extras family (caption, line endings, intent, border effect)
  • Producer-side Arabic shaping covers the full U+0672-06D5 joining-class table plus 40+ static Arabic Presentation Forms-A mappings, with post-pass ligature folding for LAM-ALEF, YEH-HAMZA + vowel pairs (U+FBEA-FBFB), the Allah ligature (U+FDF2), and the Bismillah phrase (U+FDFD)
  • Multi-script shaping capability surfaces: Syriac (GetSyriacJoiningClass / GetSyriacPosition), Mongolian (GetMongolianJoiningClass / GetMongolianPosition), Devanagari (GetDevanagariCategory / ApplyDevanagariReorder) - drive the same GSUB engine for complex non-Arabic scripts
  • Automatic Phase 8 shaping pipeline driven by the ShapingFeatures opt-in property: sfArabicGSUB applies native Arabic init / medi / fina / isol plus rlig / calt / rclt to emit font-specific contextual glyph IDs, sfCursiveAttachment applies GPOS cursive anchors, sfStandardLigatures / sfContextualLigatures emit Latin liga / clig (FB00-FB06: ff / fi / fl / ffi / ffl / ſt / st), and sfIndicShaping reorders Devanagari clusters (Repha + pre-base I-matra) before emission
  • Feature-complete OpenType GSUB substitution engine (LookupType 1-8) with Script / LangSys selection, TTF subsetter closure (MarkUnicodeGlyphUsed), Cmap format 12 SMP coverage, GDEF parsing, ToUnicode CMap auto-emission with 35 ligature reverse-mapping entries, and a GetUnicodeGlyphForCodepoint lookup for callers driving emission glyph-by-glyph
  • PUA synthetic codepoint emit (AssignSyntheticCodepointForGID / GetSyntheticCodepointForGID) lets producers emit any GSUB substitute GID (Devanagari cluster shapes, stylistic alternates, CJK ideographic variation sequences) through U+E000-F8FF Private Use Area with mirrored /CIDToGIDMap + /W integration. GetCodepointAdvance exposes the cached /W em-fraction for wrap calculations
  • OpenType GPOS positioning engine behind opt-in shaping switches: pair, single, and contextual (Context / Chained Context) kerning for both left-to-right and right-to-left text, mark-to-base / mark-to-mark / mark-to-ligature placement with per-component accuracy on ligatures, cursive entry-exit attachment, distance positioning, and vkrn / vpal vertical kerning applied to vertical text output
  • Producer-side complex-script shaping for Arabic Supplement / Extended-A / Extended-B, Syriac, Mongolian, N'Ko, Adlam, Hanifi Rohingya, Tibetan stacking, the Indic script family through the font's Indic feature chain, Javanese, Thai / Lao mark ordering, Hebrew vowel-point ordering, Khmer, Myanmar, Tai Viet, and Meetei Mayek, each behind its own opt-in switch with ToUnicode reverse mapping for copy / paste
  • Automatic OpenType typography features during text output: liga / clig / dlig / hlig ligatures, smcp / c2sc small capitals, onum / lnum / pnum / tnum figure styles, sups / subs / ordn / frac / sinf / numr / dnom, salt stylistic alternates, calt / rclt contextual alternates, locl localized forms, case forms, zero slashed zero, and vert / vrt2 vertical alternates, with chained substitutions resolved back to the source text in the ToUnicode CMap
  • Font embedding optimization: always-compressed embedded font programs, one embedded copy per document for fonts used on several pages, deterministic subset tags for reproducible output, and an optional unembedded WinAnsi mode for plain-ASCII text with standard fonts
  • AcroForm text fields, list boxes, combo boxes, check boxes, radio buttons, push-button actions (including extended Named / Hide / Show / ImportData / SubmitForm with user-controlled /Flags and THPDFActionBuilder advanced action chains), signature fields, and generated appearance streams (multi-line + comb + rich-text Tx + CID-font /AP)
  • AcroForm form-field trigger family (/AA /K Keystroke, /F Format, /V Validate, /C Calculate) with one wrapper method per JavaScript trigger, a bounded typed evaluator for conditional, string, date, and array expressions, named THPDFActionBuilder set and clear helpers, field-name wrappers for widget mouse and focus triggers (/E, /X, /D, /U, /Fo, /Bl), multi-Unicode /DR font registration via RegisterAcroFormFont, XFA (XML Forms Architecture) container support (PDF 1.7 §12.7.6 / §12.7.8) with AddXFAPacket / ClearXFAPackets / XFAPacketCount, exact-byte-preserving XDP-stream and packet-array DOM queries and edits with bounded canonical namespace, CDATA, and entity serialization, and PDF/A + PDF/X compliance gates, plus XFA-to-AcroForm flattening (ApplyXFAAsAcroForm for raw XDP bytes, FlattenLoadedXFA for a loaded PDF's embedded form) that turns static XFA into native AcroForm fields, styling, flow-measured nested layout="tb", wrapped layout="lr-tb", fixed-column and auto-column table-row text fields, and page graphics so the form stays visible and fillable in readers without an XFA engine
  • Generated-document navigation metadata: catalog /PageLabels ranges through THPDFPageLabelStyle, SetPageLabel, and the decimal / roman / alphabetic helper methods, plus catalog /Threads and per-page article beads through RegisterArticleThread and THPDFPage.AddArticleBead
  • 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 additional actions through THPDFPage.SetPageAdditionalAction and THotPDF.SetPageAdditionalAction, including THPDFActionBuilder /Next chains and clear helpers
  • PDF/UA-1 tagged-PDF accessibility surface: §14.8.4 marked-content sequence properties on BeginTaggedContent (/Lang / /Alt / /ActualText / /E), structure-element attribute setters (/Lang / /E / /T), Table 333 standard structure-type enum (THPDFStandardStructureType) plus an AddStructureElement typed overload
  • Annotation support for highlights, free text, links, file attachments, popups, redaction, watermark, rich media, 3D / U3D / PRC, border styles, and linked comment popups
  • Standard password security, AES-128 / AES-256 security handlers, PDF 2.0 R6 hashing, certificate-recipient public-key encryption through caller-supplied PKCS#7 envelopes, explicit clearing of password copies, derived file and object keys, cached AES schedules, PKCS#12 plaintext, and streamed plaintext scratch on every success or failure path, and binary-safe handling of non-ASCII colorant / font names
  • PAdES B-B, B-T, B-LT, and B-LTA digital signatures with SHA-2 or SHA3 RFC 3161 timestamp verification, append-only LTA renewal with caller-supplied DSS certificate and revocation evidence, cross-revision evidence deduplication, DSS / VRI validation, caller-supplied trust anchors, Seed Value constraints, ISO 32001 declarations, and XAdES-in-PDF
  • In-process PFX / PKCS#12 signing: the library-bundled ASN.1, RSA, AES, PBES2 AES-128 / AES-192 / AES-256 CBC and HMAC-SHA-1 / SHA-256 / SHA-384 / SHA-512 PBKDF2 profiles, legacy PBE-SHA1-3DES PFX, deterministic multi-identity localKeyId selection, matching available certificate-chain preservation, and CMS SignedData stack signs RSA and ECDSA natively or Ed25519 and Ed448 through optional OpenSSL 3 libcrypto
  • Drop-in PDF backends for FastReport 4 / FastReport VCL, QuickReport, ReportBuilder, and DevExpress ExpressPrinting System, plus a VCL TDBGrid table exporter with PDF/A and PDF/X gate opt-ins

Ngăn xếp nén và hình ảnh hiệu suất cao

Các bản dựng HotPDF hiện tại sử dụng zlib-ng ở chế độ tương thích zlib cho phần xử lý Flate đi kèm; các luồng trang, luồng phông chữ nhúng, ToUnicode CMaps, luồng hình ảnh Flate, đầu ra liên quan đến TIFF, và các trình trợ giúp FlateDecode được định tuyến qua lớp zlib của HotPDF

Các bản dựng zlib-ng Win64x và chẩn đoán MSVC Win64 bao gồm điều phối CPU thời gian chạy cho các đường dẫn SSE2, SSSE3, SSE4.1, SSE4.2, PCLMULQDQ, và AVX2 với các phương án dự phòng chung được giữ lại; Win32 vẫn duy trì trên tập hợp đối tượng zlib-ng OMF chung thông qua bcc32c, trong khi các đối tượng Win32 JPEG và TIFF tiếp tục sử dụng đường dẫn bcc32 OMF cổ điển

Quy trình làm việc JPEG tiêu chuẩn sử dụng tập hợp đối tượng libjpeg-turbo 3.1.90 đi kèm thông qua API tương thích libjpeg được hiển thị bởi HPDFJpeg.pas; các bản dựng gốc Win32, Win64, và Win64x hiện bao gồm các tập hợp đối tượng NASM SIMD liên quan, và cùng một phần xử lý JPEG gốc đó cũng có sẵn cho lớp tích hợp TIFF để xử lý TIFF được nén bằng JPEG

Cầu nối thời gian chạy C trong HPDFCLibs.pas hiện giải quyết malloc, free, realloc, calloc, memcpy, memmove, và memset thông qua một lớp hướng Pascal, với phân bổ căn chỉnh 32-byte cho các bộ đệm gốc thân thiện với SIMD

Kho lưu trữ bao gồm các tập lệnh xây dựng đối tượng có thể tái tạo: Lib\thirdparty\build-bcc32.bat, Lib\thirdparty\build-bcc64x.bat, và Lib\thirdparty\build-vc64.bat cho tập hợp thư viện C gốc đầy đủ, cộng với các tập lệnh chỉ dành cho zlib-ng để xây dựng lại nén tập trung

Ví dụ nhanh về 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.

Package Contents

Các trường hợp sử dụng điển hình