Added a Document Object

Added the document object and added tests for it. This will make it
easier if at some later time, we need to have documents other than PDF.
For example generating a .png for a quick display in a web app.