Multiple page PDF

suggest change
UIGraphicsBeginPDFContextToFile(fileName, CGRectZero, nil);
   
UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, 600, 792), nil);

UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, 600, 792), nil);

UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, 600, 792), nil);
    
UIGraphicsEndPDFContext();

This is Swift 2 (CGRectZero and CGRectMake). fileName must be a writable path. Nothing is drawn, so the file is three blank pages. UIGraphicsBeginPDFContextToFile returns false when the file cannot be created; this sample ignores that result.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents