added support for pdf surface