Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

How to print tiff image using javascript

  • 1 个回答
  • 1 人有此问题
  • 2 次查看
  • 最后回复者为 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.

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('<html><head><style>body { font-family: Verdana; font-size: 10pt; }</style></head><body>'); win.document.html(printThis); win.document.write('</body></html>'); 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.

由Pritesh.Paul于修改

所有回复 (1)

more options