Rename pdf.NewFile() to pdf.OpenFile() and pdf.NewDocument() to pdf.OpenDocument().
The original names are misleading because these constructors work on new or pre-existing files.