How to set header and footer in print layout

Discussion in 'Mac Programming' started by Monaj, Apr 4, 2010.

  1. Monaj macrumors regular

    Joined:
    May 24, 2009
    #1
    Hi all,

    I have a very simple requirement : I want to show some header and footer in print layout of a view. One approach I can use is to manipulate height of the page and display some text fields at appropriate positions as header and footer but I think there must be smarter way to do this in cocoa.

    Can any one tell me- if there is any default method to achieve this in cocoa or some smarter way to do this??

    To be more precise ... I want to show page number on center at footer such that if print layout consists of n number of pages it should display: page 1 of n, page 2 of n and so on !

    Thanks,

    Monaj
     
  2. Monaj thread starter macrumors regular

    Joined:
    May 24, 2009
    #2
    Can we insert image in header or footer in print layout?

    Hi all,

    I am able to resolve it by sub-classing NSView and coding in - (void)drawPageBorderWithSize:(NSSize)borderSize...

    Now I have a complex scenario: I have prepared a view on top which contains some images and text fields. I want to set it as header in all pages in print layout, but firstly I want to know: is it possible ? If yes then how??

    Can anyone show me some direction to achieve it?

    Thanks,

    Monaaj
     

Share This Page