Results 1 to 2 of 2

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

  1. #1
    Join Date
    Jul 2019
    Posts
    3
    Qt products
    Qt5
    Platforms
    Windows

    Default Including page nos. in .odt file with QTextDocument

    Hello
    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?
    Thanks,

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    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, 10:27
  2. Multi page report with QTextDocument
    By H Aßdøµ in forum Qt Programming
    Replies: 3
    Last Post: 16th February 2015, 00:45
  3. Replies: 4
    Last Post: 2nd October 2013, 14:57
  4. Replies: 2
    Last Post: 14th October 2011, 10:36
  5. Problem in file including.
    By Niamita in forum Qt Programming
    Replies: 5
    Last Post: 27th July 2011, 13:15

Tags for this Thread

Bookmarks

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.