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

Adding checkboxes in PDF file #6

Open
JorgeAGomez opened this issue Aug 8, 2016 · 1 comment
Open

Adding checkboxes in PDF file #6

JorgeAGomez opened this issue Aug 8, 2016 · 1 comment

Comments

@JorgeAGomez
Copy link

Is there a way of adding checkboxes?

Also can I add a string and an image besides the string?

Something like:

Do you want to participate? "Image or checkbox here"

@davidseek
Copy link

        let typeDetails = NSMutableAttributedString()
        
        let attachment = NSTextAttachment()
        attachment.image = Img.checked
        attachment.bounds = CGRect(x: 0, y: 0, width: 10, height: 10)
        let attachmentStr = NSAttributedString(attachment: attachment)


        typeDetails.append(attachmentStr)
        pdf.addAttributedText(typeDetails)

that would be the way it is done. but for whatever reason images are not accepted in attributed string here.
trying to find a solution for the exact issue myself

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

2 participants