How can I cancel rendering?

Q:

I have a long-running rendering task on Android that I’d like to cancel. How do I do so?

A:

It depends on how you’re performing the rendering.

If using PDFViewCtrl, you should be able to use PDFViewCtrl.cancelRendering() to cancel the rendering process:

https://www.pdftron.com/pdfnet/mobile/docs/Android/pdftron/PDF/PDFViewCtrl.html#cancelRendering()

If using PDFRasterizer, you can cancel the rendering with PDFRasterizer.setCancel():

https://www.pdftron.com/pdfnet/mobile/docs/Android/pdftron/PDF/PDFRasterizer.html#setCancel(boolean)