Print a HTML page of Varying height

Hello,

I have receipt where its height is dynamic. Is there a way to print the receipt according to varied height instead of height from printer preferences settings under options section.

Thank you,

Dheeraj Vislavath