On Aug 28, 2014, at 7:20 AM, Ben <ben_cocoa_dev_l...@yahoo.co.uk> wrote:

> I'm trying to make a tool for myself to fill in some repetitive forms. 
> They've got a custom paper size with a series of boxes to be filled in.
> 
> Given that I know the dimensions of the paper and the locations and 
> dimensions of the boxes to fill in, I should be able to draw a view that 
> prints onto these sheets. However, I'm getting lost in the printing system 
> trying to figure out what steps I need to take to get this working.
> 
> I don't understand how to go from the physical paper size (say 80mm wide, 
> 150mm tall) to the paper size Cocoa wants in points. Is there a method that 
> gives a scaling factor from points to any physical unit?
> 
> I'll also need to precisely position drawn strings in the view to print, so 
> will presumably need to translate points to physical dimensions when drawing 
> too.
> 
> Can anyone point me to something that might explain how to proceed here?

As the docs say, sizes are measured in the user coordinate space: 
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Transforms/Transforms.html#//apple_ref/doc/uid/TP40003290-CH204-SW5

This guide is important to read as well.

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to