Skip to content

Swift compatible? #36

Description

@vin-the-dev

I tried it in my swift project and it seems to crash every time, I tried both createPDFWithHTML and NDHTMLtoPDF.createPDFWithHTML, with no luck

let PDFCreator = NDHTMLtoPDF.createPDFWithHTML(htmlString.readString(),
baseURL: NSURL(fileURLWithPath: htmlString.path_string),
pathForPDF: toFile,
pageSize: CGSizeMake(595.2,841.8),
margins: UIEdgeInsetsMake(10, 5, 10, 5),
successBlock: nil,
errorBlock: nil)

    print("open " + toFile)

    NDHTMLtoPDF.createPDFWithHTML(htmlString.readString(),
        baseURL: NSURL(fileURLWithPath: htmlString.path_string),
        pathForPDF: toFile,
        delegate: nil,
        pageSize: CGSizeMake(595.2,841.8),
        margins: UIEdgeInsetsMake(10, 5, 10, 5))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions