• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Printing multiple pages using drawRect: (SOLVED)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Printing multiple pages using drawRect: (SOLVED)


  • Subject: Printing multiple pages using drawRect: (SOLVED)
  • From: Ian was here <email@hidden>
  • Date: Fri, 7 Oct 2005 09:40:28 -0700 (PDT)

To all who responded, thank you for your input. OK,
the solution to printing multiple pages was simple,
just had to do some stuff manually.



// Set the range of pages...

- (BOOL)knowsPageRange:(NSRangePointer)aRange
{
	aRange->location = 1;				// First page (one based)
	aRange->length = numOfPages;		// Total number of
pages.

	return	YES;
}


// This method gets called before each page is
printed...

- (NSRect)rectForPage:(int)page
{
	pageIndex = page - 1;

	return	[self bounds];
}



So, if I have several slides, one slide displayed on
the view at a time, and I want to print each slide as
a page. I use knowsPageRange: to set the number of
pages to print and use rectForPage: to draw the next
slide before drawRect: is called during the printing
process.




__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: can a Cocoa app scale jpeg images as nicely as Preview does?
  • Next by Date: Re: Problem with application hiding and revealing
  • Previous by thread: Re: Backup 3 / QuickPicks / DefinitionPlist.strings
  • Next by thread: Dynamically changing scripting dictionary
  • Index(es):
    • Date
    • Thread