en esta linea estas colocando que el nombre del archivo sea la ruta:
Cita: header("Content-Disposition: attachment; filename='$ruta'");
cambia esto asi:
Código PHP:
Ver original$ruta="../files/pdf/curso1/123456.pdf";
$nombre = "Nombre.pdf";
header('Content-type: application/pdf'); header("Content-Disposition: attachment; filename='$nombre'"); header('Content-Length: '.$len);