Added support for ps documents