added  functionality for generating pdf documents and handling pds static resources