doc = pdf.CreateDocument()
pdf.CreateDocument()
creates a new document object and returns its handle. You can then use all
documents methods with this handle. On failure, Nil
is returned.
When you're done with your document, don't forget to call doc:Free() on it to free all of its resources.