Results 1 to 2 of 2

Thread: Including page nos. in .odt file with QTextDocument

  1. #1
    Join Date
    Jul 2019
    Qt products

    Default Including page nos. in .odt file with QTextDocument

    I am using QTextdocument and QTextdocumentwriter to create .odt file. I want to include page nos. at the end of each page in .odt file. I saw people have done it with QPainter but then it is for .pdf files. I tried to use QPainter but it does not support .odt file format. Can anybody help me with some solution here?

  2. #2
    Join Date
    Jan 2008
    Alameda, CA, USA
    Thanked 649 Times in 639 Posts
    Qt products
    Unix/X11 Windows Android

    Default Re: Including page nos. in .odt file with QTextDocument

    Here is some code on github that supposedly allows insertion of headers and footers into a QTextDocument during printing. Maybe it will help. BTW, I googled "QTextDocument pagination" and this was the third hit. There are probably other solutions out there as well.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. .pro file entry when including X11/Xlib.h
    By ravas in forum Qt Programming
    Replies: 5
    Last Post: 25th May 2016, 09:27
  2. Multi page report with QTextDocument
    By H Aßdøµ in forum Qt Programming
    Replies: 3
    Last Post: 15th February 2015, 23:45
  3. Replies: 4
    Last Post: 2nd October 2013, 13:57
  4. Replies: 2
    Last Post: 14th October 2011, 09:36
  5. Problem in file including.
    By Niamita in forum Qt Programming
    Replies: 5
    Last Post: 27th July 2011, 12:15

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.