, , PDF. (UIGraphicsPushContext), , :
UIGraphicsBeginPDFContextToFile(path, CGRectMake(0, 0, 612, 792), nil);
UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, 612, 792), nil);
UIGraphicsSetPDFContextURLForRect(url, rect);
UIGraphicsEndPDFContext();
UIGraphicsSetPDFContextURLForRect 2 : -, URL-, , , - , .
, url , 72 * 72 :
UIGraphicsSetPDFContextURLForRect(url, CGRectMake(0, 0, 72, 72));
PDF. , , , , PDF . - / - (, ), .
- :
- (void) makePdf {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *pdfFile = [documentsDirectory stringByAppendingPathComponent:@"uigraphics.pdf"];
UIGraphicsBeginPDFContextToFile(pdfFile, CGRectMake(0, 0, 612, 792), nil);
UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, 612, 792), nil);
NSURL* url = [NSURL URLWithString: @"http://www.ipdfdev.com/"];
UIGraphicsSetPDFContextURLForRect(url, CGRectMake(0, 0, 50, 50));
UIGraphicsEndPDFContext();
}