             
             self.authorName = authorName
             self.pdfTitle = pdfTitle
-            
-            let tmpFilePath = SimplePDFUtilities.pathForTmpFile("SimplePDF.pdf")
+        
+            self.pdfFileName = fileName
+            let tmpFilePath = SimplePDFUtilities.pathForTmpFile(pdfFileName)
             self.pdfFilePath = SimplePDFUtilities.renameFilePathToPreventNameCollissions(tmpFilePath)
             
             self.pdfWriter = PDFWriter(textFormatter: textFormatter, pageSize: pageSize, pageOrientation: pageOrientation,

        set { document.smallestHeadingToIncludeInTOC = newValue }
    }
    
    private var pdfFilePath: String
    private var authorName: String
    private var pdfTitle: String
    
    private var document = DocumentStructure()
    private var pdfWriter: PDFWriter

    }*/

    // MARK: - SimplePDF methods
    public init(pdfTitle: String, authorName: String, fileName : String = "SimplePDF.pdf", pageSize: PageSize = .A4, pageOrientation: PageOrientation = .Portrait,
        leftMargin:CGFloat = 36, rightMargin:CGFloat = 36, topMargin: CGFloat = 72, bottomMargin: CGFloat = 36, textFormatter: DefaultTextFormatter = DefaultTextFormatter()) {
            
            self.leftMargin = leftMargin
