title: iOS - Draw text in table like structure in PDF
body: <p>I am trying to create a pdf like below image . I created string with  <code>NSString *tempStr = [NSString stringWithFormat:@" %@    %@     %@   %@ \n",monthsInfo.month,monthsInfo.principal,monthsInfo.interest,monthsInfo.balance];</code>
  I just loop this code for each row and constructed a string.</p>
  
  <p><img src="https://i.stack.imgur.com/bLD7f.png" alt="enter image description here"></p>
  
  <p>I got pdf with the code </p>
  
  <pre><code>UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, 612, 792), nil);
  
                  // Draw a page number at the bottom of each page.
                  currentPage++;
                  [self drawPageNumber:currentPage];
  
                  // Render the current page and update the current range to
                  // point to the beginning of the next page.
                  currentRange = [self renderPage:1 withTextRange:currentRange andFramesetter:framesetter];
  </code></pre>
  
  <p>I got the pdf like below image and I found formatting issue, Can any one help me to structure this pdf , or please give your suggestion which approach I need to take to construct it properly.</p>
  
  <p><img src="https://i.stack.imgur.com/MRhMQ.png" alt="enter image description here"></p>