We analyze the transverse intersubstrate pseudo-Casimir force, arising as a result of thermal fluctuations of the liquid crystalline layers of a smectic-A film confined between two planar substrates in a bookshelf geometry, in which the equidistant smectic layers are placed perpendicular to the bounding surfaces. We discuss the variation of the interaction force as a function of the intersubstrate separation in the presence of surface anchoring to the substrates, showing that the force induced by confined fluctuations is attractive and depends on the penetration length as well as the layer spacing. The strongest effect occurs for tightly confined fluctuations, in which the surface anchoring energy is set to infinity, where the force per area scales linearly with the thermal energy and inversely with the fourth power of the intersubstrate separation. By reducing the strength of the surface anchoring energy, the force first becomes weaker in magnitude but then increases in magnitude as the surface anchoring strength is further reduced down to zero, in which case the force tends to that obtained in the limit of strong anchoring.