michaelrsweet / htmldoc

HTML Conversion Software
https://www.msweet.org/htmldoc
GNU General Public License v2.0
206 stars 46 forks source link

Resolution of background image #476

Closed BartVanderDonck closed 2 years ago

BartVanderDonck commented 2 years ago

Hello,

I use htmldoc to generate invoices in PDF. My client wants to have a beautiful layout with all kinds of graphics, so I make a background image of it. This way I have maximum control over the exact positions and layout. My problem is that the background resolution is not sharp enough. On large screens, the small letters appear blurry.

For regular images I found a workaround, namely to have an image say 300x600 px and then do:

<img border="0" alt="" scr="..." height="100" width="200">

This sharpness with this "factor 3" is now okay both in large screen display, printing and zooming.

But for background images this feature is not available.

Is there a possibility to have sharper backgrounds ?

Thank you, Bart

michaelrsweet commented 2 years ago

If you specify a large --browserwidth value (say, 2000) it will scale the background accordingly. You'll also need to adjust any pixel dimensions as well (since the value controls the scaling of pixel sizes).