views:

165

answers:

0

I am developing an application on iPAD to display pdf.

I am using CATiledLayer to draw PDF pages. at a time i am displaying only one page of the pdf.if user clicks next or prev button i am displaying the pages accordingly.

I have subclassed the CATiledLayer to make fadeDuration as 0.0.

I am facing 2 problems. 1. my application is working properly in portrait mode, but when i draw pages in landscape mode tiled layer is taking time to draw the page and part by part it is drawing. i am using same code to draw in portrait and landscape as well, i am changing only the size of tiled layer.

2.When i run the application on simulator there were no issues, but when i run the application on iPAD device for some of the pdf's its i displaying below console logs. I observed this only for some of the pdf's not for all.

but when it is displaying these logs application is taking more time to display the page.

Text clipping 0x137890: Node 0: HelveticaLTMM (51.4644, 51.4644, -51.4644, 51.4644, 193.599, 253.946) 74 (0, 0) Node 1: HelveticaLTMM (51.4644, 51.4644, -51.4644, 51.4644, 230.756, 291.103) 91 (0, 0) Node 2: HelveticaLTMM (51.4644, 51.4644, -51.4644, 51.4644, 265.083, 325.43) 105 (0, 0) Node 3: HelveticaLTMM (51.4644, 51.4644, -51.4644, 51.4644, 296.527, 356.875) 106 (0, 0) Node 4: HelveticaLTMM (51.4644, 51.4644, -51.4644, 51.4644, 319.378, 379.725) 1 (0, 0) Text clipping 0x1eeb10: Node 0: HelveticaLTMM (51.4644, 51.4644, -51.4644, 51.4644, 193.599, 253.946) 74 (0, 0) Node 1: HelveticaLTMM (51.4644, 51.4644, -51.4644, 51.4644, 230.756, 291.103) 91 (0, 0) Node 2: HelveticaLTMM (51.4644, 51.4644, -51.4644, 51.4644, 265.083, 325.43) 105 (0, 0) Node 3: HelveticaLTMM (51.4644, 51.4644, -51.4644, 51.4644, 296.527, 356.875) 106 (0, 0) Node 4: HelveticaLTMM (51.4644, 51.4644, -51.4644, 51.4644, 319.378, 379.725) 1 (0, 0) Text clipping 0x1ec430:

Can anyone please tell me how to solve this problem. my application is crashing if i continuosly scroll prev page and current page because of slow drawing the page.