Invalid WeasyPrint page size. (8.27 inch x 11.69 inch)

I am working on a project that uses WeasyPrint to output documents. for life, I can’t understand why it does not fit the page size by default.

I would expect it to be by default 8.5 x 11 inches. instead, pdf files look 8.27 x 11.69 inches.

for life I can’t understand why the page size is disabled.

any ideas?

+6
source share
1 answer

I found that the css @page tag will allow me to change the actual page size of what pdf will generate:

@page { size: Letter; margin: 0in 0.44in 0.2in 0.44in; } 

good times, trying to understand what one of them is.

+13
source

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


All Articles