Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. custom print

custom print

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 561 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • lincolnL Offline
    lincolnL Offline
    lincoln
    wrote on last edited by lincoln
    #1

    Good afternoon, my question is this; how can I print in a certain position of a paper that already has printed text, I just want to print in certain areas of the paper, which on purpose has dimensions different from an A4 sheet, is about the size of a voucher.

    NOTE.
    I leave the image of the voucher, if it can be called like that, I want to print in only in the lines. is that possible. I would appreciate any suggestion.

    0_1554236606961_NuevoDocumento 2019-04-02 15.22.30_1.jpg

    Solitary wolf

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      From your description you would have to do some custom painting on your QPrinter object and draw the image at the right coordinates so they appear on the positions your want on your paper sheet.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • lincolnL Offline
        lincolnL Offline
        lincoln
        wrote on last edited by
        #3

        ok, that's what I thought, but being honest, I've never used the objects to print Qt, I could use an example, of course if it's possible. I have been reading the Qt documentation, but it is not clear to me how to start. And thanks for your comment.

        Solitary wolf

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          The C++ GUI Programming with Qt 4 book by Jasmin Blanchette, Mark Summerfield contains a pretty nice example on how to do custom painting. You should check the example of the corresponding chapter.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • lincolnL Offline
            lincolnL Offline
            lincoln
            wrote on last edited by
            #5

            Ok. Thanks

            Solitary wolf

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved