6

I'm using BNHtmlPdfKit to render Html to PDF. It worked great but in iOS8 it just hangs on

[renderer drawPageAtIndex:i inRect:renderer.paperRect];

To be honest I don't even know how to debug it - theres no error messages and you can keep pressing continue but just breaks at the same breakpoint. In the end it just times out.

Anyone got any ideas?

Cheers

Chris
  • 2,727
  • 2
  • 27
  • 28
  • I'm getting a very similar issue with NDHTMLtoPDF - it crashes on this same function call i.e. drawPageAtIndex. If I run the code in the simulator using OS7.1 then it works just fine. But it crashes when I'm using OS8.1, both in simulator and on device. So it looks like an OS bug to me. If so that's a huge problem. How else to render HMTL to PDF?! – Graham Dawson Nov 04 '14 at 23:56
  • Yes I think it's an issue with the os as well, I did spend a TSI on this but as of yet this hasn't been resolved or found any solutions. I did also raise a n Api feature request as well. But I m stumped. – Chris Nov 05 '14 at 00:05

2 Answers2

4

Make sure that you do not have exception breakpoints enabled in Xcode. That will cause the app to hang here. You can ignore the exception that occurs inside of the method call you listed above.

DCG
  • 181
  • 9
2

You can disable only an exception that is thrown by UIPrintPageRenderer called __cxa_throw and any other exception breakpoint will still work. enter image description here

Dima Cheverda
  • 402
  • 1
  • 4
  • 10