Create PDF file Extension. Layout to PDF

how to store a created pdf file into Tiny db?