X
Tryk her for at gå til webstedets mobilversion.

Supportforum

How to print tiff image using javascript

Skrevet

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.

Ændret af Pritesh.Paul den

Yderligere systemdetaljer

Installerede plugins

  • AlternaTIFF v2.0.8
  • Google Update
  • The plugin allows you to have a better experience with Microsoft Lync
  • The plugin allows you to have a better experience with Microsoft SharePoint
  • 5.1.40416.0

Program

  • User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0

Yderligere information

Luk
guigs 1072 løsninger 11697 svar
[https://support.mozilla.org/en-US/kb/where-go-developer-support Where to go for developer support]