I have created a PDF page with box using core graphics (Image).
I am facing a problem, which is comment section I am not able to set "Text" individual wise. Any idea how can I do this?
Code for "Comment" section.
textToDraw=@"Comments:";
newfont=fontName2(7);
renderingRect = CGRectMake(20,146.5, 842, 300.0);
[textToDraw drawInRect:renderingRect withFont:newfont lineBreakMode:nil alignment:nil];
////////////////
CGContextSetLineWidth(currentContext, 1.0);
CGContextMoveToPoint(currentContext, 20,155);
CGContextAddLineToPoint(currentContext,295, 155);
CGContextStrokePath(currentContext);
CGContextSetLineWidth(currentContext, 1.0);
CGContextMoveToPoint(currentContext, 20,170);
CGContextAddLineToPoint(currentContext,295, 170);
CGContextStrokePath(currentContext);
CGContextSetLineWidth(currentContext, 1.0);
CGContextMoveToPoint(currentContext, 20,185);
CGContextAddLineToPoint(currentContext,295, 185);
CGContextStrokePath(currentContext);
CGContextSetLineWidth(currentContext, 1.0);
CGContextMoveToPoint(currentContext, 20,200);
CGContextAddLineToPoint(currentContext,295, 200);
CGContextStrokePath(currentContext);
@try{
textToDraw=@"";
NSString *commentText=@"helo how are you. i am tuna string. i have so many friends. helllo i am working.here is my paragraph writing";
renderingRect = CGRectMake(62, 146, 220, 400);
newfont=fontName2(7);
[commentText drawInRect:renderingRect withFont:newfont lineBreakMode:NSLineBreakByWordWrapping alignment:NSTextAlignmentLeft];
}
@catch(NSException *e){
}