Added support for direct PDF output