-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't open PDF on my iPhone #84
Comments
Probably the same problem as described here? To verify you can try to comment out this line in https://github.com/mikehaertl/php-tmpfile/blob/master/src/File.php#L77
|
Interesting, now I can see the PDF on my iPhone but none of the values are filled, it's just the blank form. You can try it here: https://www.die-partei-lichtenberg.de/mitgliedsantrag/ At least the "Datum" (date) should be filled when submitting the empty form. Same in Firefox and Chrome on my iPhone 7 :-( |
Things you could try:
If this doesn't work, I have no idea. Probably some idiosyncracy with PDF forms on iOS. PDF forms can be a real pain. But if you find out and we can implement a fix, let us know. Regarding your initial problem: I wonder, if it makes sense to autodetect iOS devices and omit the |
I agree that it'd make sense to autodetect iOS, I implemented it this way:
Also tried this one: I really don't know too much about filling PDF forms and don't know where to start debugging so my workaround would be to offer the blank PDF to iOS users and tell them to fill the PDF themselves ;-) |
@pboese I've pushed a slightly modified version of your fix to master on https://github.com/mikehaertl/php-tmpfile. Could you maybe help testing? You only have to replace the |
Don't worry, me neither 😆
Sounds like a solid workaround. :) |
One more note: it should be |
Solid indeed :D shame on you, Apple! Your fix works as expected. I used stripos() because I wasn't sure if preg_match() wasn't a bit slower, but it probably won't matter too much in this case anyways. It doesn't matter if it's
But sounds more logic, yeah :-) |
At least it's a known problem: https://forums.adobe.com/thread/2266388 Sorry we couldn't fully fix your problem. But thanks for your help. This eventually helped to fix a download issue with iOS. I'll create a new release for php-tmpfile now, containing your fix. |
Downloads using HTTP/2 protocol do not work for the same (or similar) reason. When there is content-length set and using HTTP/2 files from the browser fail to download (even using curl). |
@krukru I don't want to add too many workarounds especially if it's not clear why it's failing. We do nothing wrong IMO. As a workaround I'd suggest you write your own download logic. Something like this should work:
|
@krukru and others: I'm still struggling to find a solution for this. The problem is that you can't reliably detect HTTP/2 from PHP (at least not if you consider proxy setups). If anyone has an idea feel free to comment here: mikehaertl/php-tmpfile#16 |
Every time I try on my iPhone, I get an error message. I tried both send() and send('whatever.pdf'). None work. It works perfectly on Android and desktop browsers. Any Idea what
might cause this issue?
The script is here: https://www.die-partei-lichtenberg.de/mitgliedsantrag/
Thanks in advance!
The text was updated successfully, but these errors were encountered: