mysterioustrousers/MTPDF — pull request #4 by Vortec4800 (2014-10-28 17:29:58+00:00)
Title: Fixed issue when drawing in UIView context

The docs say you can draw a PDF into an UIView context by using the drawInContext: but that isn't entirely true. The drawInContext: method seems to want a PDF context instead of an image context, so a fatal error is thrown and the draw doesn't complete correctly.

This change splits the draw methods out into two, one to draw into a PDF context and one that draws into any context at a specified size for any view.

Might be able to refactor the imageWithPixelsPerPoint: method as well to use this new drawInContext:atSize: method, but I didn't want to pull apart anything else.