         }
         do {
             try outputToFile(outputPath) {
-                try renderPages(pages)
+                try renderPages(pages, dpi: dpi)
             }
         } catch (let error) {
             _ = try? NSFileManager.defaultManager().removeItemAtPath(outputPath)

     - returns: PDF's binary data (NSData)
     */
    @warn_unused_result
    public class func generate(imagePath: String) throws -> NSData {
        return try generate([imagePath])
    }
    
    /**

     - returns: PDF's binary data (NSData)
     */
    @warn_unused_result
    public class func generate(images: [UIImage], dpi: DPIType = .Default) throws -> NSData {
        return try generate(PDFPage.pages(images), dpi: dpi)
    }
    
    /**
