I'm trying to create a PDF document with some pages in portrait and others in landscape, but seeing this example (iText7 - Page orientation and rotation) I found that the page rotates to landscape but the text also does it (PDF generated from iText7 samples), then, I need that the pages to rotate but the text continues from left to right, how in the next image.
Note: I tried to use document.getPdfDocument().addNewPage(new PageSize(PageSize.A4.rotate()));
but it works for one page, not for the next x pages.