문제

IE7에서 PDF를 표시하는 데 문제가 있습니다 (R & OS 'EZPDF에 의해 생성).

Acrobat Reader 8.1.2와 IE7. "페이지를 표시 할 수 없습니다"라고 말합니다.

다른 브라우저 (FF3/Acrobat 8.1.2. 또는 IE6/Acrobat 7)는 파일에 아무런 문제가 없습니다.

다음 헤더는 서버에 의해 반환됩니다.

날짜 : THU, 2009 년 1 월 8 일 10:52:40 GMT
서버 : Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8G PHP/5.2.5 DAV/2
X- 구동 바이 : PHP/5.2.5
만료 : Thu, 1981 년 11 월 19 일 08:52:00 GMT
캐시 제어 : 없음 스토어, 캐시가 없음, 필수 검증서, 체크 후 = 0, 사전 체크 = 0
Pragma : 캐시가 없습니다
컨텐츠 길이 : 4750
Keep-Alive : 타임 아웃 = 5, max = 100
연결 : 계속하십시오
내용 유형 : 응용 프로그램/PDF

이 문제를 해결하는 방법을 아는 사람이 있습니까?

도움이 되었습니까?

해결책

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache

...so IE won't store the file in the Temporary Internet Files folder. However the mechanism used to directly 'Open' a file from the browser in IE often requires it to be opened from inside Temporary Internet Files. Directly opening a file from a browser is generally unreliable, especially in IE; 'Save as' works better.

Consider replacing the cachebusting headers with an alternative method, such as add a '?randomstring' parameter to the URL. Also consider adding a "Content-Disposition: attachment; filename=..." header, which will stop a plug-in trying and failing to display the file in the browser UI.

다른 팁

I think I've solved the problem.

The problem is not on the server-side but on the client-side. The generated PDF is being displayed in a popup-window (javascript: window.open) and IE7 chokes on it.

When I open a html-file in the popup which is redirecting to the PDF it works.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top