coder
coder

Reputation: 21

Generate PDF from HTML using Python with multiple orientation(Portrait and Landscape)

I designed the PDF(template) in HTML and converting/using it in Python.

I need both orientation in my PDF output(Portrait and Landscape)?

Upvotes: 1

Views: 782

Answers (1)

RebRy
RebRy

Reputation: 21

Make your pages as separate files (one with the -O landscape flag in your wkhtml2pdf call, and one without). You can call ghostscript to join the files together in python using the subprocess module

Upvotes: 1

Related Questions