开发者

How to set header and footer in print layout

I have a very simple requir开发者_StackOverflow社区ement: I want to show a header and footer in print layout of a view. One approach I can use is to manipulate the 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- is there 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 !


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,

Miraaj

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜