Re: No-frills print to label printer help please
Re: No-frills print to label printer help please
- Subject: Re: No-frills print to label printer help please
- From: "Boaz Stuller" <email@hidden>
- Date: Mon, 26 May 2008 14:32:47 -0400
Playing with the CTM won't make your drawing area bigger because your
drawing area is already clipped to the view's frame by the time your drawing
code is called. You need to actually make the view's frame bigger (with
setFrame: or setFrameSize:) if you want it to show up bigger in its
superview.
It sounds like you skipped the part in my first reply where I set the
margins to the inset of the imageablePageBounds from the pageSize. IIRC,
when I first was writing my app, the print was coming out tiny, and the
reason was because the print info was defaulting to normal-size (i.e.
1/2-1") margins, which takes away 1/2 the possible printing area on a 2"
label. Once I re-set the margins to properly tiny values, it worked fine.
Best wishes,
Bo
On Mon, May 26, 2008 at 1:24 PM, Rick Mann <email@hidden> wrote:
>
> On May 26, 2008, at 07:35:50, Boaz Stuller wrote:
>
> I haven't tested that, but that should scale up your view to approximately
>> the page size. OTOH, if you know the label size in advance you can just
>> multiply the inches by 72 to get the size your view needs to be able to fill
>> the label and just create it at least that size. For a 2.34 x 4 label, that
>> would be a label 169 x 288, but as long as you preserved the aspect ratio,
>> you could make it any amount bigger and still be fine if you use
>> NSFitPagination.
>>
>
>
> So, I tried scaling my displayed view just by setting the CTM, and that
> ended up clipping to the view bounds.
>
> Then I tried creating a new view with the page size values (approximately
> 2288 x 166). For some reason, this *still* prints smaller on the page. The
> printer is actually 300 DPI, and it's as if I have to scale to 2.31" X 4" (*
> 300) to get it to do exactly what I want, but now we're working in device
> coordinates, which seems to go against the docs and common sense.
>
> This is getting to be very frustrating :-(
>
> Thanks for your suggestions.
>
> --
> Rick
>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden