Results 1 to 4 of 4

Thread: PyQt5 QPrinting setFullpage doesn't works

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Aug 2017
    Posts
    11
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: PyQt5 QPrinting setFullpage doesn't works

    Oh, I see, I though that setFullpage would scale the contents automatically. Lesson learned.
    Thank you, ChrisW67, that pretty much fixes my issue. The printing of my widget is now a full page after scaling it.

    However, now I'm stuck on the very next step (not sure if I should make a new thread for it).
    The result is a PDF printed with just an image and no selectable text. MyWidget is suppose to mimic a MSAccess report for invoices, with its Logos, text, tables and stuff, so just an screenshot with the data won't do the job, it needs to be selected.
    Researching this issue, I've been reading about printing to pdf as a QTextDocument with html formatting, but that sounds like a very undesirable workaround for something like this. I also found something about QGraphicsScene but I don't think that's the best solution either.

    Is there any simple way to print a QWidget (with some QlineEdits and QLabels inside) as a PDF that can read text and not just an screenshotted version of MyWidget?

    Edit: For easier understanding, I need this (which is already a working Qwidget) in PDF:
    9T-KH7KlSkmsBUKW7xcbWA.jpg
    Last edited by Saelyth; 12th August 2017 at 11:54.

Similar Threads

  1. Replies: 3
    Last Post: 26th August 2016, 15:40
  2. Works on 64bit doesn't on 32 bit
    By daniel_dm in forum Newbie
    Replies: 3
    Last Post: 5th August 2013, 13:24
  3. Replies: 3
    Last Post: 6th July 2011, 06:59
  4. Replies: 1
    Last Post: 31st December 2010, 16:35
  5. QPrinter setFullPage(): Win/Linux Diffs
    By ChrisW67 in forum Qt Programming
    Replies: 2
    Last Post: 9th October 2009, 05:31

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
  •  
Qt is a trademark of The Qt Company.