Downloading a pdf file getting corrupted

Hi i m using the following code to download a pdf file
header(‘Content-type: application/pdf’);
header(‘Content-Disposition: attachment; filename=“download.pdf”’);
readfile(“mages/books/$fl”);

Where $fl is a vraible that store my original pdf file name
when i download file , it do it but when i open that file aDOBE gives error it is corrupted or changed…

Please help

Is the filesize the same?

Thanks buddy i got the solution, actually it was appending some thing iun the file coz it was in joomla framework so after a last line of code i put a exit there

thats all.

Any way thanks for showing intrest in my prob.