Restler sets the headers after we return the result from our api method
If we want to override this default behaviour, we need to stop executing further, just add die/exit as shown below on your api method
header("Content-type: application/pdf");
header("Content-Length: ". $data["Size"]);
header('Content-Disposition: attachment; filename="'. $data["Name"].'"');
die();
HTH