Value cannot be null. Parameter name: format

Solved problem by explicitly declaring a memory stream object to hold the PDF. Save method worked just fine after that.