I'm using wkhtmltopdf to produce a PDF from a single HTML file, formatted into separate pages using page-break-before: always
. For example:
<div class="cover">
Cover Page
</div>
<div class="page">
Page 1
</div>
<div class="page">
Page 2
</div>
With CSS:
.page {
page-break-before: always;
}
Right now, I have the wkhtmltopdf command written to print the PDF in portrait orientation on letter-size pages. I need one of the pages to be in landscape orientation and the rest to be in portrait orientation (so that when the PDF is viewed on screen, all of the content will be oriented correctly).
Is there a way to mix orientations in a single PDF?
If this is not possible, is there a way to merge multiple PDFs using wkhtmltopdf? (I have seen other suggestions of different pdfmerge software.) I could split my HTML source file into multiple files for each page if necessary.