      
      - throws: A `PDFGenerateError` thrown if some error occurred.
      */
-    public class func generate(view: UIView, outputPath: String) throws {
-        try generate([view],outputPath: outputPath)
+    public class func generate(view: UIView, outputPath: String, dpi: DPIType = .Default) throws {
+        try generate([view],outputPath: outputPath, dpi: dpi)
     }
     
 

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

        }
    }
    
    class func renderPages(pages: [PDFPage], dpi: DPIType) throws {
        try pages.forEach { try renderPage($0, dpi: dpi) }
    }
    
    class func outputToFile(outputPath: String, process: Process) rethrows {
