Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-137915

Support for changing page orientation mid-document in QTextDocument (to support mixed portrait/landscape pages)

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • Active Qt
    • None

      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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            owolff Oliver Wolff
            ahmedaredah_vtti Ahmed Aredah
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes