 import Foundation
 import UIKit
 
-
+/**
+ PDFPage type
+ 
+ - WhitePage: A white view (CGSize).
+ - View:      A view. (UIView)
+ - Image:     An image (UIImage)
+ - ImagePath: An image path (String)
+ */
 public enum PDFPage {
     case WhitePage(CGSize)
     case View(UIView)

        }
    }
    
    public class func generate(view: UIView, outputPath: String) throws {
        try generate([view],outputPath: outputPath)
    }
    
    public class func generate(views: [UIView], outputPath: String) throws {
        try generate(PDFPage.pages(views), outputPath: outputPath)
    }
    
    public class func generate(image: UIImage, outputPath: String) throws {
        try generate([image], outputPath: outputPath)
    }
    
    public class func generate(images: [UIImage], outputPath: String) throws {
        try generate(PDFPage.pages(images), outputPath: outputPath)
    }

    public class func generate(imagePath: String, outputPath: String) throws {
        try generate([imagePath], outputPath: outputPath)
    }
    
    public class func generate(imagePaths: [String], outputPath: String) throws {
        try generate(PDFPage.pages(imagePaths), outputPath: outputPath)
    }
    
    @warn_unused_result
    public class func generate(page: PDFPage) throws -> NSData {
        return try generate([page])
    }

    @warn_unused_result
    public class func generate(pages: [PDFPage]) throws -> NSData {
        guard !pages.isEmpty else {

    
    private init() {}
    
    /**
     Generate from page object.
     
     - parameter page:       A `PDFPage`'s object.
     - parameter outputPath: An outputPath to save PDF.
     
     - throws: A `PDFGenerateError` thrown if some error occurred.
     */
    public class func generate(page: PDFPage, outputPath: String) throws {
        try generate([page], outputPath: outputPath)
    }
    
    /**
     Generate from page objects.
     
     - parameter pages:      Array of `PDFPage`'s objects.
     - parameter outputPath: An outputPath to save PDF.
     
     - throws: A `PDFGenerateError` thrown if some error occurred.
     */
    public class func generate(pages: [PDFPage], outputPath: String) throws {
        guard !pages.isEmpty else {
            throw PDFGenerateError.EmptyPage
