Home/ Reference/ Units & Conversion

page.SizeWidth * page.SizeHeight

Page area in square units. Use it as the denominator when you ask what fraction of the page an element occupies.

Signature

page.SizeWidth * page.SizeHeight

Notes

Page area in square units. Use it as the denominator when you ask what fraction of the page an element occupies.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
page = doc.ActivePage

w, h = page.SizeWidth, page.SizeHeight
area = w * h                            # the unit is squared document units
print("Page area: ", round(area, 3), "square units")

# convert to square millimetres (document unit is inch here)
area_mm2 = area * 25.4 * 25.4
print("roughly: ", round(area_mm2, 0), "mm²")

About this section: Units & Conversion

Units & Conversion — document units and conversion.

Other entries in this section