Om de ûnderfining foar jo te ferbetterjen is tydlik de funksjonaliteit dan dizze website troch ûnderhâldswurk beheind. Wannear in artikel jo probleem net oplost en jo in fraach stelle wolle, kin ús stipemienskip jo helpe yn @FirefoxSupport op Twitter en /r/firefox op Reddit.

Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Mear ynfo

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

How to print tiff image using javascript

  • 1 antwurd
  • 1 hat dit probleem
  • 2 werjeftes
  • Lêste antwurd fan 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.

Bewurke troch Pritesh.Paul op

Alle antwurden (1)

more options