Verurteilt  Kind
Verurteilt Kind

Reputation: 3

Reportlab 2 or more pages per file

How can I generate a PDF with two or more pages with reportlab? I've been unable to find anything in the documentation.

Upvotes: 0

Views: 177

Answers (2)

Duncan Lock
Duncan Lock

Reputation: 12781

I think you can just keep .append()ing stuff and it will break the pages automatically once it get's too large for a single page, or you can force a page break by doing:

.append(PageBreak())

Upvotes: 0

Joran Beasley
Joran Beasley

Reputation: 114088

canvas.showPage()

will force a new page (even though it sounds like its showing a page,)

(assuming you are using the canvas)

if you are using flowables I think there is a PageBreak flowable

Upvotes: 1

Related Questions