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

℡╲_俬逩灬. 提交于 2019-11-29 18:59:04

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/29831775/weasyprint-page-size-wrong-8-27in-x-11-69-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!