Loaded-Page Colour Rewrite
THotPDF.RewriteLoadedPageColors converts selected page paint to DeviceGray, DeviceRGB, or DeviceCMYK for print, proofing, and archival preparation
Hybrid conversion
Pages containing only device-colour operators retain their original text, paths, and searchable content whilst g, rg, and k fill and stroke operations are converted in the token-preserving content stream
Pages that use images, Form XObjects, patterns, shadings, transparency, Type 3 glyph colour, ICCBased or other resource-backed colour spaces are rendered through the complete colour-managed page pipeline and replaced by one lossless Flate image in the requested process space
Rotated pages are rasterised in unrotated user space before the original /Rotate value is reapplied by readers, preventing double rotation
Spot-colour boundary
lcspPreservePages is the default and leaves every page containing Separation, DeviceN, or NChannel colourants byte-for-byte untouched
lcspConvertToProcess resolves tint transforms through the renderer and flattens the page into the selected process space, whilst lcspReject rejects the complete request during preflight
Atomic bounds
Page, source-content, operator, lexeme, nesting, replacement, raster-pixel, encoded-output, and cancellation limits are checked before publication
All selected pages commit through one copy-on-write graph transaction, so render, content, budget, cancellation, and commit failures leave the loaded object graph unchanged
Annotation dictionaries remain attached but their appearance streams are not colour rewritten or flattened into page paint