implementing pdf output