• 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
PDF setCurrentPage OS Bug ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PDF setCurrentPage OS Bug ?


  • Subject: PDF setCurrentPage OS Bug ?
  • From: Robert Miller <email@hidden>
  • Date: Fri, 20 Jul 2001 15:03:24 -0400
  • Organization: RFM & Associates

Hello,

I'm trying to display PDF files using NSImage which has an
NSPDFImageRep., The first page displays OK but when I call the
setCurrentPage method for the image rep nothing seems to happen. I call
the [myImage recache] method and that doesn't force any display change
either. The image has setDataRetained set to TRUE so recaching will
occur. Below is the code


-(void)setCurrentPage:(int)pageNum
{
currentPage = pageNum;
if (currentPage < 0)
currentPage = pageCount;
if (currentPage >= pageCount)
currentPage = 0;

if (theNSImage != nil) {

NSArray *reps = [theNSImage representations];
unsigned index;
unsigned count = [reps count];

for (index = 0; index <count; index++) {
NSPDFImageRep *irep = [reps objectAtIndex:index];
if ([irep isKindOfClass:[NSPDFImageRep class]]) {
[theNSImage recache];
[irep setCurrentPage:currentPage];
[self setNeedsDisplay:YES];
break;
}
}
}
}

is there some other setting(s) that have to be changed to display a
different page(s)???

Any help is greatly appreciated.
Thanks
Bob M.


  • Prev by Date: Drawer refresh bug
  • Next by Date: Using beginSheet
  • Previous by thread: Drawer refresh bug
  • Next by thread: Using beginSheet
  • Index(es):
    • Date
    • Thread