PDF page orientation can be modified through two distinct mechanisms: updating the metadata `/Rotate` dictionary attribute (0°, 90°, 180°, or 270°) or physically transforming the underlying content stream transformation matrix (CTM). Modifying the `/Rotate` attribute provides instantaneous, lossless reorientation by directing compliant PDF rendering engines to rotate the viewport coordinates during rasterization. For complex publishing and scanning pipelines, physical coordinate normalization is often preferred. This method mathematically recalculates bounding MediaBox, CropBox, BleedBox, and TrimBox coordinates while applying an affine transformation matrix to vector paths and glyph coordinate arrays, preventing inverted text baselines when opening files in legacy print spoolers or OCR engines. Correcting sideways or upside-down orientations is critical before running Optical Character Recognition (OCR) or submitting documents to automated invoice processing pipelines, as skewed text baselines reduce character recognition accuracy by over 40%.