Future of KPrinter

Alex Merry huntedhacker at tiscali.co.uk
Sat Sep 8 21:32:16 BST 2007


On Saturday 08 Sep 2007, Matt Rogers wrote:
> On Sep 8, 2007, at 2:29 PM, Alex Merry wrote:
> > Are custom margins really needed?
>
> What do you mean by custom margins? I think they would be needed for
> printing things like photos where the margins are very tiny or
> nonexistant.

Well, KPrinter (and Qt3's QPrinter) provides methods which allow you to 
get and set the left, right, top and bottom margins.

QPrinter provides paperRect() and pageRect(), the latter being the 
printable area.  There is no way to set the margins yourself, but you 
can use setFullPage() to change the origin from the top left of 
pageRect() to the top left of paperRect().

The reason setting the margins doesn't really make sense is that 
printers have an area that they can print on (which may be the full 
page for some printers), and no amount of software settings is going to 
change that.

I'm not sure what applications are currently setting the margins for - 
possibly just to change the co-ordinate system.  However, you can do 
this using QPainter::translate().

Alex



-- 
KDE: http://www.kde.org
Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070908/814bc563/attachment.sig>


More information about the kde-core-devel mailing list