How does one position the text in a pdf using UIGraphicsBeginPDFContextToData or UIGraphicsBeginPDFContextToFile ?
I want to have an image with positioned text and stored as a pdf.
How does one do the positioning and the layout for pdfs.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Search for the drawInRect-methods in the documentation. UIImage has one and NSString has some variants of this method, that allow you to select a font, alignment etc. These draw in the created PDF graphics context.
The positioning is done with the origin coordinates of the given CGRect.