pageSizeForPaper:
指定した用紙のサイズをポイントで返します
-(NSSize)pageSizeForPaper:(NSString *)paperName:
解説
指定した用紙のサイズをポイントで返します。
PPDで設定されたサイズです。
返り値
( NSSize )
サイズ
引数
( NSString * )paperName
用紙名
フレームワーク
ApplicationKit
クラス
NSPrinter
Instance Methods
使用可能
10.0
参照
- imageRectForPaper:
例文
#import "Controller.h" @implementation Controller - (IBAction)pushButton:(id)sender { NSSize size =[[NSPrintInfo defaultPrinter] pageSizeForPaper:@"A4"]; NSLog([NSString stringWithFormat:@"w=%.1f,h=%.1f",size.width,size.height]); } @end