How does one position the开发者_如何学C 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.
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.
精彩评论