Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

PDF files pushed by PHP scripts cannot be previewed in the browser (only "Save as" dialog is displayed). How can I fix this?

  • 2 trả lời
  • 3 gặp vấn đề này
  • 3 lượt xem
  • Trả lời mới nhất được viết bởi PoetulGardiideNord

more options

Running Firefox 27.0 on Linux Mint Petra (16).

Direct download links to PDF files (URLs that end in .pdf) preview or open (or whatever I set in the App preferences dialog) no problem. However, any PDF file that is pushed by a php script can only be downloaded (no matter what I set in the App preferences dialog).

I have several PCs running the same software (Linux Mint Petra with FF 27). All of them exibit the same problem.

I've tried all solutions to similar problems listed here. None of them worked.

Running Firefox 27.0 on Linux Mint Petra (16). Direct download links to PDF files (URLs that end in .pdf) preview or open (or whatever I set in the App preferences dialog) no problem. However, any PDF file that is pushed by a php script can only be downloaded (no matter what I set in the App preferences dialog). I have several PCs running the same software (Linux Mint Petra with FF 27). All of them exibit the same problem. I've tried all solutions to similar problems listed here. None of them worked.

Tất cả các câu trả lời (2)

more options

You need to install server software to process the php code and send the file as text/html to Firefox.

<?php header('Content-Type: text/html; charset=utf-8'); ?>
more options

I don't think the problem is on the server side. On a Windows machine, after clicking on the same link I can get FF to display a dialog box asking me weather to save or open (with whatever viewer) the file.