Output the PDF as a string

Fixes #15
Gives a public output() function.
Check if values not already defined

Fixes #4