Loaded-Page Color Rewrite
THotPDF.RewriteLoadedPageColors converts selected page paint to DeviceGray, DeviceRGB, or DeviceCMYK for print, proofing, and archival preparation
Hybrid conversion
Pages containing only device-color operators retain their original text, paths, and searchable content while 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 color, ICCBased or other resource-backed color spaces are rendered through the complete color-managed page pipeline and replaced by one lossless Flate image in the requested process space
Rotated pages are rasterized in unrotated user space before the original /Rotate value is reapplied by readers, preventing double rotation
Spot-color 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, while 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 color rewritten or flattened into page paint