Hi, I'm developing PDF reports with Reportlab and Python.
The first page is A4 landscape
the second and third pages are A4 portrait
Is it possible to add pages but by changing the orientation of certain pages?
The first page is A4 landscape
the second and third pages are A4 portrait
Is it possible to add pages but by changing the orientation of certain pages?
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4, landscape
from reportlab.lib.pagesizes import A4, portrait
def create_pdf():
pdf_file = 'C:\\Pdf\\multipage.pdf'
can = canvas.Canvas(pdf_file, pagesize=landscape(A4))
can.drawString(20, 800, "First Page")
can.showPage()
can.drawString(20, 800, "Second Page")
can.showPage()
can.drawString(20, 800, "Third Page")
can.showPage()
can.save()
create_pdf()
