devongovett/pdfkit — pull request #197 by bobzoller (2014-02-14 19:53:45+00:00)
Title: fix a few max call stack size exceeded errors

Resolves a RangeError when finalizing documents with many images and/or many pages. Basically we're just ensuring that async functions call the callback in the next event loop in a few places where sometimes they returned async but sometimes they returned sync.

should resolve https://github.com/devongovett/pdfkit/issues/110