Ensure Writer Defined Cover Art is of a specific height

Post here questions and problems related to editing and publishing DITA content.
jmp120
Posts: 7
Joined: Thu Aug 17, 2017 8:27 pm

Ensure Writer Defined Cover Art is of a specific height

Post by jmp120 »

I'm developing an XSL-FO plugin and have default cover art that covers a specific area of the US Letter sized cover. However, we must also allow our writers to change this art when necessary. In our previous plugin, we had explicit requirements of the dimensions of this art. This prevented writers from simply using product images they would use in topics as cover art. However, with this new plugin I would like to implement a method that ensures that the <fo:external-graphic/> captures the required vertical space even if the image itself does not.

What would be the best way to ensure that a specific height is always achieved with the image centered on that space if its height is smaller?