2
を右から左にそれを印刷私はNSDataの印刷画像とその下のテキストや
を使用して画像を印刷する方法を知っていると私はまた、唯一のUISimpleTextPrintFormatter
使用してテキストを印刷するには知っています画像とその下のテキストを印刷したいのですが
どうすればいいですか?
左からではなく右の座標から印刷を開始するにはどうすればよいですか?
NSMutableString *printBody = [NSMutableString stringWithFormat:@"some text"];
UIPrintInteractionController *pic = [UIPrintInteractionController sharedPrintController];
pic.delegate = self;
UIPrintInfo *printInfo = [UIPrintInfo printInfo];
printInfo.outputType = UIPrintInfoOutputGeneral;
printInfo.jobName = @"print";
pic.printInfo = printInfo;
UISimpleTextPrintFormatter *textFormatter = [[UISimpleTextPrintFormatter alloc] initWithText:printBody];
textFormatter.startPage = 0;
textFormatter.font=[UIFont fontWithName:@"Arail Bold" size:40];
textFormatter.contentInsets = UIEdgeInsetsMake(216.0, 288.0, 72.0, 72.0);
textFormatter.maximumContentWidth = 6 * 72.0;
textFormatter.textAlignment=UITextAlignmentRight;
textFormatter.font=[UIFont fontWithName:@"Arail Bold" size:40];
pic.printFormatter = textFormatter;
pic.showsPageRange = YES;
[pic presentAnimated:YES completionHandler:NULL];
[textFormatter release];
は、私はあなたが何を意味するか正確にわからないんだけど、このヘルプを行い、あなたに
は、私はあなたが私がプレイした場合、私が思うに、私はテキストフォーマッタがページ の右側に描画されたい右 へのテキストの配置を設定した場合と同様、印刷ページのアライメントが を右から左に開始することにしたいですそれは幅であり、テキストの配置を右に設定します。私は必要なものを得るでしょうが、問題は、幅を設定する方法がわからず、テキストの配置を右に設定できません。 – Rawan