Surface ordering and finite-size effects in liquid-crystal films