#732 Wrong filename when downloading PDF from an Android device

closed
nobody
None
5
2012-10-09
2012-07-25
Anonymous
No

The Android browser does not set the download filename correctly.

The Problem is the ; character after filename in "Content-Disposition" header:

Not working:
header('Content-Disposition: attachment; filename="'.basename($name).'";');

Working:
header('Content-Disposition: attachment; filename="'.basename($name).'"');

The Problem is explained here:
http://www.digiblog.de/2011/04/android-and-the-download-file-headers/

You can also have a look to the RFC:
https://www.ietf.org/rfc/rfc2183.txt

I have append a patch file for you (tcpdf.php.diff).

Thank you for the excellent library.

Dear

G. Jelden

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-07-25
     
  • Aleksey Kuznetsov

    Yes, confirming this bug! I though that I had some problem with my phone. After deleting ";" from TCPDF everything works great!

     
  • Nicola Asuni

    Nicola Asuni - 2012-07-25

    OK. Fixed on TCPDF 5.9.174.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks