I asked your question on Github, because I had the same the issue. Here is the response of the developer which works for me:
What about doc.output('dataurl'); ?
The PDF is now displayed inline. The user can save it, print it and no new popup is generated.
regards