Configuring NSPrinterInfo to print on a labeled paper.

  • Hello, Im working on a application that generates custom labels to stick into magazines with some information in it.
    Now I have an NSArray of Stickies on a NSViewController, so in the drawRect method of its view, Im iterating thru the array and displaying all the information per label moving the NSPoint  the some deltax or deltaY pixels, so at the end when I click print and then I open as a pdf I see the paper with many labels on it. Now the problems

    1. on the page break it breaks the label on half, I think its because I will have to implement the method knowsPageRange and rectForPage of the NSView,,

    2. one sheet contains 24 labels, but I hadn't been able to aligned what I print with the borders of each label in the sheet horizontally,  I tried setting the NSPrinterInfo setMargin....  methods to 0, and it helped a little but still at the bottom rows of labels all start being messed up,

    So I stop printing papers to save the world a little and im writing to you guys asking for help.

    If the label sheet has 8 rows and 3 columns, top and bottom margin of 4-5mm and left and right margin of 0mm, how to set up the printer and therefore my view so all the label's info will be within the bounds of each label on the sheet?

    OH and the Sheet is a A4 size.

    Thanks in advance, I hope somebody out there can give me some lights on this one.

previous month april 2010 next month
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today