• 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
NSImageView printing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSImageView printing


  • Subject: NSImageView printing
  • From: Peter Schols <email@hidden>
  • Date: Mon, 7 Feb 2005 12:16:48 +0100

Hi,

I'm working on a scientific app that will print a custom view that has some text views and one NSImageView as its subviews.
Both the text and the image in the NSImageView look fine on screen (the imageView is set to scale the image proportionally). However, when printed, the image inside the NSImageView is clipped, both horizontally and vertically. It looks like the image is printed at about 150% the size of the NSImageView, inside the imageView, causing it to be clipped.


I have searched the list and I could only find one related answer pointing to NSPrintInfo's setHorizontalPagination. However, I tried all 3 possible settings and that did not help. So here is what I have:

- A custom view that has many NSTextFields and one NSImageView
- The NSImageView is set to scale the image proportionally

The print code:

- (void)printShowingPrintPanel:(BOOL)flag
{
NSPrintInfo *printInfo = [self printInfo];
[printInfo setHorizontalPagination:NSFitPagination];
[printInfo setVerticalPagination:NSFitPagination];
[printInfo setHorizontallyCentered:YES];
[printInfo setVerticallyCentered:YES];
[printInfo setLeftMargin:20.0];
[printInfo setRightMargin:20.0];
[printInfo setTopMargin:20.0];
[printInfo setBottomMargin:20.0];
NSPrintOperation *printOp;
printOp = [NSPrintOperation printOperationWithView:pedigreeView printInfo:printInfo];
[printOp setShowPanels:flag];
[printOp runOperation];
}


Any help would be much appreciated!
TIA

Peter

_______________________________________________
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: NSString's -(NSSize)sizeWithAttributes returns zero!?
  • Next by Date: Re: Using resources from Cocoa app
  • Previous by thread: NSString's -(NSSize)sizeWithAttributes returns zero!?
  • Next by thread: Java NSViews Using Clear Colors
  • Index(es):
    • Date
    • Thread