I figured out how to return a pdf from a python script: context.REQUEST.RESPONSE.setHeader('Content-Type','application/pdf') return context['blach.pdf'] Sam