Join us and the lead editor of IRL, Mozilla's multi-award-winning podcast, for a behind-the-scenes look at the pod and to contribute your ideas for the next season, themed: "AI and ME." Mark your calendar and join our Community Call on Wednesday, Aug 7, 17:00–17:45 UTC. See you there!

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

Firefox 4.0 support for printing embedded PDF files in iFrames via JavaScript

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

more options

I recently upgraded to Firefox 4.0 and can no longer print embedded PDF documents contained in an iFrame.

My company's web application has several pages which load PDF files from a Servlet into an iFrame. The pages in question all have "Print" buttons which when clicked executes a JavaScript function to obtain reference to the iframe containing the PDF, place it into focus() (e.g., frames['pdfdoc'].focus();), and invoke print() (e.g., frames['pdfdoc'].print();). There are no errors, or exceptions caught when the JavaScript function is invoked, but the "Print" button is no longer operational.

Does Firefox 4.0 no longer support iFrames? The issue goes away if I revert back to ver 3.6.16

I recently upgraded to Firefox 4.0 and can no longer print embedded PDF documents contained in an iFrame. My company's web application has several pages which load PDF files from a Servlet into an iFrame. The pages in question all have "Print" buttons which when clicked executes a JavaScript function to obtain reference to the iframe containing the PDF, place it into focus() (e.g., frames['pdfdoc'].focus();), and invoke print() (e.g., frames['pdfdoc'].print();). There are no errors, or exceptions caught when the JavaScript function is invoked, but the "Print" button is no longer operational. Does Firefox 4.0 no longer support iFrames? The issue goes away if I revert back to ver 3.6.16

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

more options

I have same issue for printing embedded PDF files in iFrames via JavaScript in Firefox 5.0.

In previous versions it was working fine. But not in Firefox 4.0/5.0.

Is there any solution for this problem?

more options

This happens only for invisible iframes (display:hidden). Setting width="1"

 height="1" style = "border:none" for iframe will make it "almost" invisible and printing will work properly.