theme pdf: keep ratio

Suggested by Kenshi Muto. Thanks!!!