Creates a pdf given a resource to a pdf template and a json object.