Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
Currently, QTextDocument only supports a single pageSize() / setPageSize() value for the entire document. I would like to be able to generate a report or document where one or more pages use landscape orientation, while the rest remain in portrait orientation.
Use case: For example, when generating reports with tables or diagrams that need a wider layout on one page, and normal text on other pages.
Attempted workaround: I tried to change the report orientation before and after the landscape page, but this did not work, as orientation is global for the document.
Requested feature: Ability to change the page size/orientation mid-document (similar to how word processors allow inserting section breaks to change orientation). A possible mechanism might be to allow QTextBlockFormat::setPageBreakPolicy() or some other API that can trigger a page break with a new page size/orientation.