Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WeasyPrint page size wrong. (8.27in x 11.69 in)

I am working on a project that uses WeasyPrint to output documents. for the life of me I cannot figure out why it is defaulting the page size to a non standard page size.

I would expect it to default to 8.5 x 11 inches. instead the pdfs come out as 8.27 x 11.69 inches.

for the life of me I cannot figure out why the page size is so off.

any ideas?

like image 674
Nathan Tregillus Avatar asked Apr 23 '15 18:04

Nathan Tregillus


Video Answer


1 Answers

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

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

good times trying to figure that one out.

like image 76
Nathan Tregillus Avatar answered Sep 20 '22 08:09

Nathan Tregillus