Forum How do I...?

Scaling Background Images

afingret
We have a document that uses distinct screen and print css. In the screen version, we have our company name represented by text. In the print version, we use css to hide the text and show a background image of our company logo. When we generate PDFs with prince, the logo shows up. Nice.

Problem is, the background image/logo will only print at low-resolution. A high-resolution png file just makes the background image physically large (the width and height of the image grows proportionately).

Assuming we do not want to go with a javascript solution, is there any way to scale a css background image, so that it maintains it's intended width, height and resolution?
mikeday
We will need to change Prince to respect the physical resolution specified in the background image file, and also add a new property to override it if necessary, similar to the existing image-resolution property. I've added this issue to the roadmap for the next release.
mikeday
We have now released Prince 6.0 rev 3, which respects the resolution specified in background images and also supports a new property, prince-background-image-resolution, for overriding it. Thanks for raising the issue! :)
laurentsj
afingret wrote:
We have a document that uses distinct screen and print css. In the screen version, we have our company name represented by text. In the print version, we use css to hide the text and show a background image of our company logo. When we generate PDFs with prince, the logo shows up. Nice.



Hi Afingret

Do you produce a large quantity of documents specifically for Screen and Print ?

Do you have some workflow ? any batch processing tips ?

Thanks for any help


best

L
afingret
We do not produce a large quantity of documents. We are currently using Prince for a single unique application.