Loaded Document Toolkit
HotPDF can open an existing PDF, apply page and form operations, inspect typed document state, render or search pages, print with device capabilities, and save the result without moving the workflow to another library
Page operations and merging
THotPDF.DeletePagesaccepts the standard one-based page-range syntax, removes duplicate selections once, and preserves a valid page tree- Deleting loaded pages detaches widget annotations and empty AcroForm field branches that belonged only to the deleted pages
THotPDF.InsertPagesFromDocumentandTHotPDF.AppendPagesFromDocumentacceptTHPDFMergeOptions- Form-name conflicts are checked before page insertion when automatic renaming is disabled, so a rejected merge leaves the destination page count unchanged
THPDFMergeOptionvalues aremoIncludeOutlines,moIncludeFormFields, andmoRenameConflictingFormFields- Outline destinations are remapped through the selected source-to-destination page map, while imported form roots are registered in the destination AcroForm
THotPDF.InsertLoadedBlankPageinserts a caller-sized blank page at an exact zero-based positionTHPDFWatermarkTemplate.MakeCurveadds a cubic Bezier curve to ordered composite loaded-page watermarksTHPDFPage.AddCurveWatermarkprovides the same cubic Bezier primitive during new-document authoring- Loaded document metadata setters mark the Info dictionary dirty so incremental saves retain edited fields
ExtractLoadedPagesTextToStreamwrites UTF-8 page text directly to a caller-owned stream with range, separator, and BOM controlsTHPDFViewerModelexposes page form-field hit testing and deterministic top-to-bottom keyboard navigation without creating a windowTHPDFSignatureInfo.CertificateTimeValidityclassifies certificate bounds and signed-time consistency without changing cryptographicsvValidsemanticsSetDocumentAttachmentMetadatarenames an embedded file and updates its description before the document is savedTHPDFLoadedFormFieldexposes flags, MaxLen, page index, bounds, and common text-field behaviours for property inspectorsTHPDFViewerModelcreates caller-owned page snapshots and writes the current page directly as BMP while reusing the loaded render cacheTHPDFViewerModelrotates the current view and generated snapshots in 90-degree steps without modifying the loaded PDF pageTHPDFViewer.ResetViewrestores presentation defaults without unloading the document or changing the current page
Forms and search
THotPDF.AddLoadedRadioButtoncreates a parent radio field with child widgets, shared export values, and valid on/off appearance statesGetLoadedFormFieldNameValuePairsandSetLoadedFormFieldNameValuePairsexchange lightweightname=valuebatches throughTStringsExtractLoadedPagesTextaggregates a one-based page range with a caller-selected separatorCMapResourcePathoverrides automatic CMap discovery with a caller-selected root containing the standard collection foldersTHotPDF.SearchLoadedNextis a stateless page-local search primitive that moves forward from a previousTHPDFTextMatchTHPDFLoadedDocumentFacadegroups loaded forms, annotations, outlines, fonts, and images into typed collection objectsTHPDFLoadedFormInfoincludes the current and default value, field type, description, read-only flag, and choice options
Outlines and resources
THotPDF.GetLoadedOutlineEntriesreturns a complete preorder snapshot asTHPDFLoadedOutlineEntryArray- Each
THPDFLoadedOutlineEntryhas an index, parent index, level, title, and resolved destination page index THPDFLoadedOutlineInfoexposes the same hierarchy throughTHPDFLoadedOutlineCollectionTHPDFLoadedResourceCollectionenumerates fonts and loaded images and can extract supported images as caller-owned bitmaps
System certificate signing
THotPDF.SignPDFWithSystemCertificatesigns file or stream input through a Windows certificate-store private keyTHPDFCertificateStoreSelectorselects current-user or local-machine scope, store name, SHA-1 thumbprint, and whether key-provider UI is allowedTHPDFCMSSignDigestCallbackandHPDFCMSSignPDFStreamWithExternalSignerprovide the underlying external-digest signer hook- CNG keys use RSA PKCS#1 SHA-256 signing and legacy CSP keys use the equivalent CryptoAPI path
Printing
THPDFPrintOptionssupports collated copies, paper code, custom paper width and length, orientation, duplex, bin, and qualityTHPDFPrinterCapabilitiesreports parallel paper codes, names, and physical sizes alongside bins, resolutions, duplex, colour, and maximum copiesHPDFBuildPrintPageSequenceexposes the deterministic physical page sequence used for collated and uncollated jobs
VCL viewer components
THPDFViewerModelowns navigation, zoom state, text-search results, wrapping, and change notifications without creating a windowTHPDFViewerrenders the selected page into a scrollable cached bitmap, supports actual size, fit page, fit width, custom zoom, and view rotation, and draws current search hits over the rendered pageTHPDFSearchPanelconnects search text, case sensitivity, whole-word matching, and next or previous navigation to a viewerTHPDFOutlineViewerdisplays the full recursive bookmark tree, follows document changes from the linked viewer, and navigates the linked viewerTHPDFViewerActiondescendants provide first, prior, next, last, zoom, fit, rotation, reset, find-next, and clear-search actions
Minimal viewer setup
PDF.LoadFromFile('input.pdf');
PDFViewer.PDFDocument := PDF;
OutlineViewer.Viewer := PDFViewer;
SearchPanel.Viewer := PDFViewer;
PDFViewer.ZoomMode := vzmFitWidth;
Ownership and indexing
- Loaded page indexes and destination page indexes are zero-based
- Page-range strings are one-based and use the same parser as extraction and printing
- Facade records are snapshots and collection mutation methods operate on the current loaded document
- Extracted bitmaps are owned by the caller
Related typed inspection and placement records
THPDFPageElementKind,THPDFPageElement, andTHPDFBaselineRoledescribe text, image, path, and baseline results returned by loaded page-element inspectionTHPDFWatermarkKind,THPDFWatermarkHorizPos, andTHPDFWatermarkVertPosselect the content and placement of loaded-document watermarks