overloaded createDDPDF() function with output stream as input