reportlab 尝试
1 inch = 2.5cm
1 point = 1/72 inch
Setting the Page Size
8.5 inch = 8.5*72 = 612.0 point
1 cm = 28.34 points
from reportlab.lib.pagesizes import LETTER
canvas = Canvas("hello.pdf", pagesize=LETTER)
1cm=0.3937008 inch
1 inch = 2.5cm
1 point = 1/72 inch
1 inch = 72 points
Setting the Page Size
8.5 inch = 8.5*72 = 612.0 point
1 cm = 28.34 points
>>> from reportlab.lib.pagesizes import LETTER
>>> canvas = Canvas("hello.pdf", pagesize=LETTER)
A4
210 mm x 297 mm
21cm x 29.7cm
21*0.3937 inch x 29.7*0.3937 inch
8.2677 inch x 11.69inch
21*0.3937*72 points x 29.7*0.3937*72 points
595 points x 841points
drawImage的时候,x,y的0点在哪里?
左下角是(0,0)
一张 图片的大小建议为400像素的宽,然后高按照图像的比例进行缩放;
基本常识: