Until there's a new feature for this, I think you could replace your newPage()
calls to a custom newPageWithBleed()
that goes something like this, and wouldn't need to change any of your other drawing code —
def newPageWithBleed(w, h, bleed):
newPage(w + bleed * 2, h + bleed * 2)
translate(bleed, bleed)
W, H = 400, 400
bleed = 25
newPage(W, H)
rect(0, 0, 20, 20)
newPageWithBleed(W, H, bleed)
rect(0, 0, 20, 20)