ios - Generate a pdf from opengles context in iphone/ipad -
hi noob @ pdf generation , displaying 3d bar charts in application in glview in side uiview. want generate pdf document uiview contains text view , glview. able generate pdf text gl view unable proceed.even tried possibility on net unable info regarding this.can me providing solution whether can possible or not.thanks in advance
you can ask uiview give image (which might start) via like:
- (uiimage *) imagerepresentation { // render myself (or more correctly, layer) image uigraphicsbeginimagecontext(self.bounds.size); cgcontextref context = uigraphicsgetcurrentcontext(); cgcontextsetshouldsmoothfonts(context, false); cgcontextsetshouldantialias(context, false); [self drawlayer:self.layer incontext:context]; [self.layer renderincontext:context]; uiimage *image = uigraphicsgetimagefromcurrentimagecontext(); uigraphicsendimagecontext(); return image; }
after that, might able pdf representation of it, or investigate calls cgpdfdocumentcreatewithurl
construct 1 image.
Comments
Post a Comment