Created
December 13, 2018 22:21
-
-
Save elecyb/aed8acfbacf7acd37177736e21cee62e to your computer and use it in GitHub Desktop.
Solucion para la impresion de NE desde el chrome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Default.html b/Default.html | |
index b1a9003..1b486f6 100644 | |
--- a/Default.html | |
+++ b/Default.html | |
@@ -31,14 +31,20 @@ | |
// ventimp.close(); | |
//} | |
function imprimirDiv(nombre) { | |
+ var altoVentana = 1; | |
+ var anchoVentana = 1; | |
if (window.ActiveXObject || ("ActiveXObject" in window)) { | |
var ficha = document.getElementById(nombre); | |
} | |
else { | |
var ficha = $('#' + nombre + ''); | |
+ if (window.chrome) { | |
+ altoVentana = 800; | |
+ anchoVentana = 1000; | |
+ } | |
} | |
- var ventimp = window.open(' ', 'popimpr', "width=1,height=1,top=1,location=no,status=no,menubar=no,left=0,top=100,screenX=0,screenY=0,copyhistory=no"); | |
- ventimp.document.write('<link rel="stylesheet" href="estilos/EstilosWebNoHttps.css" />') | |
+ var ventimp = window.open(' ', 'popimpr', "width=" + anchoVentana + ",height=" + altoVentana + ",top=1,location=no,status=no,menubar=no,left=0,top=100,screenX=0,screenY=0,copyhistory=no"); | |
+ //ventimp.document.write('<link rel="stylesheet" href="estilos/EstilosWebNoHttps.css" />') | |
ventimp.document.write('<link rel="stylesheet" href="estilos/EstilosWebNoHttps-imprimir.css" media="print" />') | |
if (window.ActiveXObject || ("ActiveXObject" in window)) { | |
ventimp.document.write(ficha.innerHTML); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment