This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (void)combinePDFURLs:(NSArray *)PDFURLs writeToURL:(NSURL *)URL | |
{ | |
CGContextRef context = CGPDFContextCreateWithURL((__bridge CFURLRef)URL, NULL, NULL); | |
for (NSURL *PDFURL in PDFURLs) { | |
CGPDFDocumentRef document = CGPDFDocumentCreateWithURL((__bridge CFURLRef)PDFURL); | |
size_t numberOfPages = CGPDFDocumentGetNumberOfPages(document); | |
for (size_t pageNumber = 1; pageNumber <= numberOfPages; ++pageNumber) { | |
CGPDFPageRef page = CGPDFDocumentGetPage(document, pageNumber); |