Tìm kiếm hỗ trợ

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How to print tiff image using javascript

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

more options

Hi, I am using html button print tiff image. When I click on "Print" button new window gets opened. Below is the code

       var printThis = image tag with src set to image path
       win = window.open();
       self.focus();
       win.document.open();
       win.document.write('<style>body { font-family: Verdana; font-size: 10pt; }</style>');
        win.document.html(printThis);
        win.document.write('');
       win.document.close();
       win.print();
       win.close();

this code do not show any image on new window. If I replace "printThis" as below

         var printThis = '<embed id="pre" access="4" src="' + imgName + '" type="image/tiff" width="100%" />';

It will show me image but, If I print the page then it will do not print anything.

I am using AlternaTIFF to show tiff images. please suggest me solution for this. I am not getting answer on this.

Được chỉnh sửa bởi Pritesh.Paul vào

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

more options