Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with compile errors #23

Closed
f15radar opened this issue Jan 30, 2018 · 6 comments
Closed

Issue with compile errors #23

f15radar opened this issue Jan 30, 2018 · 6 comments

Comments

@f15radar
Copy link

I added this to my project, but I m getting compile errors in SimplePDF.swift => drawtext

    let attributes: [NSAttributedStringKey: Any] = [
        .font: font,
        .foregroundColor: textColor,
        .paragraphStyle: paragraphStyle
    ]

Type 'NSString' has no member 'font'

    let attributes: [NSAttributedStringKey: Any] = [
        .foregroundColor: textColor,
        .paragraphStyle: paraStyle,
        .obliqueness: skew,
        .font: font
    ]

Type 'NSString' has no member 'foregroundColor'

Any clues?

@nRewik
Copy link
Owner

nRewik commented Jan 30, 2018

What’s Swift version that you use ?

@f15radar
Copy link
Author

Sorry....3.2, I guess I need to update to 4 or do you have a 3 version?

@nRewik
Copy link
Owner

nRewik commented Jan 30, 2018 via email

@f15radar
Copy link
Author

Now I am getting pdf does not have a member writeToFile. I am using v2.0.0

@f15radar
Copy link
Author

I got it to compile.....I used

try? pdfData.write(to: path, options: .atomic )

@nRewik nRewik closed this as completed Jan 31, 2018
@cogsdawgs
Copy link

when I use try? pdfData.write(to: path, options: .atomic) it gives me a URL error. Any easy ways to get around that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants