uiprintpagerenderer

How to set the Legal Page size for PDF created using UIPrintPageRenderer?

两盒软妹~` 提交于 2020-08-06 04:33:47
问题 I am setting this: static CGFloat LegalPageWidth = 612.0; static CGFloat LegalPageHeight = 1008.0; as legal page size (i.e 8.5 x 14 inch) for PDF creation in UIPrintPageRenderer as "paperRect" but when I print the PDF its size is always A4 (i.e 612 x 792 = 8.5 x 11 inch). What is the correct way to get Legal Page size PDF ? 回答1: The UIGraphicsBeginPDFPage creates the new page using the default size while the UIGraphicsBeginPDFPageWithInfo function lets you customize the page size or customize

How to set the Legal Page size for PDF created using UIPrintPageRenderer?

爷,独闯天下 提交于 2020-08-06 04:33:12
问题 I am setting this: static CGFloat LegalPageWidth = 612.0; static CGFloat LegalPageHeight = 1008.0; as legal page size (i.e 8.5 x 14 inch) for PDF creation in UIPrintPageRenderer as "paperRect" but when I print the PDF its size is always A4 (i.e 612 x 792 = 8.5 x 11 inch). What is the correct way to get Legal Page size PDF ? 回答1: The UIGraphicsBeginPDFPage creates the new page using the default size while the UIGraphicsBeginPDFPageWithInfo function lets you customize the page size or customize

How to set the Legal Page size for PDF created using UIPrintPageRenderer?

时光总嘲笑我的痴心妄想 提交于 2020-08-06 04:33:08
问题 I am setting this: static CGFloat LegalPageWidth = 612.0; static CGFloat LegalPageHeight = 1008.0; as legal page size (i.e 8.5 x 14 inch) for PDF creation in UIPrintPageRenderer as "paperRect" but when I print the PDF its size is always A4 (i.e 612 x 792 = 8.5 x 11 inch). What is the correct way to get Legal Page size PDF ? 回答1: The UIGraphicsBeginPDFPage creates the new page using the default size while the UIGraphicsBeginPDFPageWithInfo function lets you customize the page size or customize

Printing Pdf using AirPrint causes cut-off content

你说的曾经没有我的故事 提交于 2019-12-12 09:17:37
问题 Here i am printing pdf with size 'pageSize = CGSizeMake(640, 832);'. this size is larget then A4 size page aspected. so i will cut-off some text(means it will not print whole page). while printing same pdf using MAC, it will print whole page with help of option (scale to fit). so can any one help me to come out from this problem.. is there any option in IOS sdk for scale to fit. here is my code.. -(void)printItem { NSArray *aArrPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,

Using One or More Formatters with a Page Renderer in iOS

假装没事ソ 提交于 2019-12-07 23:54:23
问题 Has anyone tried using multiple formatters ( UIViewPrintFormatter , UIMarkupTextPrintFormatter , UISimpleTextPrintFormatter ) with a page renderer ( UIPrintPageRenderer ) to print the content? I'm trying to use two UIMarkupTextPrintFormatters with a UIPrintPageRenderer subclass, but i'm failing to get the print. I'm using MyPrintPageRenderer class from PrintWebView sample code. I've gone through the Apple's documentation but it isn't very helpful, and there is no sample code associated with

Using One or More Formatters with a Page Renderer in iOS

♀尐吖头ヾ 提交于 2019-12-06 13:39:39
Has anyone tried using multiple formatters ( UIViewPrintFormatter , UIMarkupTextPrintFormatter , UISimpleTextPrintFormatter ) with a page renderer ( UIPrintPageRenderer ) to print the content? I'm trying to use two UIMarkupTextPrintFormatters with a UIPrintPageRenderer subclass, but i'm failing to get the print. I'm using MyPrintPageRenderer class from PrintWebView sample code. I've gone through the Apple's documentation but it isn't very helpful, and there is no sample code associated with the description. I've tried a couple of solutions but so far I haven't had any success. Any suggestions?

Printing Pdf using AirPrint causes cut-off content

时光总嘲笑我的痴心妄想 提交于 2019-12-04 19:26:51
Here i am printing pdf with size 'pageSize = CGSizeMake(640, 832);'. this size is larget then A4 size page aspected. so i will cut-off some text(means it will not print whole page). while printing same pdf using MAC, it will print whole page with help of option (scale to fit). so can any one help me to come out from this problem.. is there any option in IOS sdk for scale to fit. here is my code.. -(void)printItem { NSArray *aArrPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) ; NSString *aStr = [[aArrPaths objectAtIndex:0] stringByAppendingPathComponent: