In a printer, page thickness is compensated for by measuring a displacement between a printhead and a print media support surface. A sensor flag engages a surface of said print media and provides an indication to an optical sensor of the displacement. The print media support surface may be a platen having a non-constant radius such that rotation of the platen adjusts the displacement between a contact surface of the platen and a the printhead.