PDA

View Full Version : use QPrinter to print on an object with fixed size



Origin
22nd August 2012, 13:55
Hello,

I am trying to make a program where a user can fill in certain things on a picture. (A billing picture). The user has plain text edits in an UI. And when he would press print the text edits would be translated on a picture with size 10cm (width) x 20cm(height). Now I was wondering how I could make it so that it prints this on an A4 page at the left top corner?

So the result would be an A4 page, with a picture of 10cm x 20cm with filled in data from the program, and the rest blank (for the user to fill in other stuff).
The way I thought was maybe setting the margins of the page of the right side and bottom side? So if an A4 is 25cm you set the right border to 15 so that it only prints from 0 tot 10 (25 - 15 = 10). But i think this is a bad solution? Any other suggestions?