Added support for direct PDF output

I have added the last missing output mode - as a string. It's useful when saving PDF to a database etc.