Note that there are some explanatory texts on larger screens.

plurals
  1. POPdf generation for dynamic data
    primarykey
    data
    text
    <p>In the generatin of a pdf, a new page is created but the data is not written to the pdf, this is the code I am using, please help me solve this problem:</p> <pre><code> x=50; y=y-20; BOOL isNewPageReq=FALSE; for(int trLisCnt=2;trLisCnt&lt;=4;trLisCnt++){ NSMutableArray *tranListingContArray=[eachSkuAry objectAtIndex:trLisCnt]; for(int dicCnt=0;dicCnt&lt;[tranListingContArray count];dicCnt++){ NSMutableArray *actContents=[tranListingContArray objectAtIndex:dicCnt]; y=y-10; if(y&lt;=40){ //here i am checking the y position y=700;//here i am setting y position for the new page CGContextEndPage(pdfContext);//here i am ending the current page CGContextBeginPage(pdfContext, &amp;pageRect);/*here i am starting a new page,i am ending this page at end not shown in this*/ } x=50; for(int j=0;j&lt;7;j++){ if((j==0)&amp;&amp;(trLisCnt==2)){ const char *str=[@"SO" UTF8String]; CGContextShowTextAtPoint(pdfContext,x,y,str,strlen(str)); x=x+50; } else if((j==1)&amp;&amp;(trLisCnt==2)){ const char *cont=[[actContents objectAtIndex:3]UTF8String]; CGContextShowTextAtPoint(pdfContext,x,y,cont,strlen(cont)); x=x+50; } else if((j==2)&amp;&amp;(trLisCnt==2)){ const char *cont=[[actContents objectAtIndex:1]UTF8String]; CGContextShowTextAtPoint(pdfContext,x,y,cont,strlen(cont)); x=x+50; } else if((j==3)&amp;&amp;(trLisCnt==2)){ const char *cont=[@"NULL" UTF8String]; CGContextShowTextAtPoint(pdfContext,x,y,cont,strlen(cont)); x=x+110; } else if((j==4)&amp;&amp;(trLisCnt==2)){ const char *cont=[@"NULL" UTF8String]; CGContextShowTextAtPoint(pdfContext,x,y,cont,strlen(cont)); x=x+110; } else if((j==5)&amp;&amp;(trLisCnt==2)){ const char *cont=[@"NULL" UTF8String]; CGContextShowTextAtPoint(pdfContext,x,y,cont,strlen(cont)); x=x+110; } else if((j==6)&amp;&amp;(trLisCnt==2)){ const char *cont=[[actContents objectAtIndex:2]UTF8String]; CGContextShowTextAtPoint(pdfContext,x,y,cont,strlen(cont)); x=x+50; } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload