custom print



  • 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


  • Lifetime Qt Champion

    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.



  • 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.


  • Lifetime Qt Champion

    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.



  • Ok. Thanks


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.