CSS layout for A4 printing

I am trying to host print magazines in a web application using XHTML and CSS. It is not simple! I would like to know if the CSS structure can help me handle page format, positioning, and physical units such as millimeters.

I forgot some details. Logs are not printed directly by the user using print.css. The application creates a PDF version, which is then printed.

+4
source share
1 answer

What do you use as a PDF generator? In my experience, not all PDF generators are predictable in the way they render CSS. The best I have found is Prince XML, but a commercial server license of $ 3,600, which depending on what you intend to use for it, can be quite expensive.

In any case, it’s pretty easy to adapt an infrastructure like Blueprint to use metric units instead of pixels. The print frames I checked do not seem to provide what the CSS frames do.

-1
source

Source: https://habr.com/ru/post/1309016/


All Articles