
Imprimir Varios Iframes De Uma Vez!?
Started By Artamais, 13/03/2008, 11:36
10 replies to this topic
#1
Posted 13/03/2008, 11:36
Bom dia pessoal eu consigo imprimir o conteudo de um iframe mas na minha pagina tem varios iframes pois ela paga material de varios lugares.
Como faço para mandar imprimir tudo em um clique apenas????
Segue abaixo o codigo:
_________________________________________________________________________
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
function PrintIframe(FrameInline)
{
FrameInline.focus();
FrameInline.print();
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
</script>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
scrollbar-arrow-color:#000000;
scrollbar-3dlight-color:#CDC7C9;
scrollbar-highlight-color:#CDC7C9;
scrollbar-face-color:#ffffff;
scrollbar-shadow-color:#ffffff;
scrollbar-darkshadow-color:#CDC7C9;
scrollbar-track-color:#ffffff;
background-color: #FFFFFF;
}
.style1 {
font-family: Tahoma, "Lucida Bright", Verdana;
font-size: 7pt;
color: #000000;
font-weight: bold;
}
-->
</style>
<link href="inter-home.css" rel="stylesheet" type="text/css">
<link href="calendario.css" rel="stylesheet" type="text/css">
<link href="txt_tabelas.css" rel="stylesheet" type="text/css">
</head>
<body>
<table border="0" align="center" cellspacing="0" cellpadding="0" height="100%" width="560">
<td valign="top" height="100%">
<iframe name="destaque" id="destaque" src="destaque.htm" width="100%" height="180" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="administracao" id="administracao" src="administracao.htm" width="100%" height="1780" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="marketing" id="marketing" src="marketing.htm" width="100%" height="2210" frameborder="0" cellpadding="0" cellspacing="0"> </iframe><u></u>
<iframe name="comunicacao" id="comunicacao" src="comunicacao.htm" width="100%" height="745" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="design" id="design" src="design.htm" width="100%" height="925" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="educacao" id="educacao" src="educacao.htm" width="100%" height="520" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="relacoes" id="relacoes" src="relacoes.htm" width="100%" height="660" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="entrevista" id="entrevista" src="entrevista.htm" width="100%" height="185" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="ti" id="ti" src="ti.htm" width="100%" height="945" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="midia" id="midia" src="midia.htm" width="100%" height="175" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="eventos" id="eventos" src="eventos.htm" width="100%" height="315" frameborder="0" cellpadding="0" cellspacing="0"> </iframe> </td>
<tr>
<td height="5" valign="top"><div align="center">
Aqui abaixo como eu faço para mandar imprimir tudo!
<input type="button" value="Imprimir Iframe" onClick="PrintIframe(destaque);"/>
</p>
</div></td>
<tr>
<td valign="top"> </td>
</table>
</body>
</html>
___________________________________________________________________________
Bem fico no aguardo de um ajuda valeu galera.
Como faço para mandar imprimir tudo em um clique apenas????
Segue abaixo o codigo:
_________________________________________________________________________
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
function PrintIframe(FrameInline)
{
FrameInline.focus();
FrameInline.print();
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
</script>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
scrollbar-arrow-color:#000000;
scrollbar-3dlight-color:#CDC7C9;
scrollbar-highlight-color:#CDC7C9;
scrollbar-face-color:#ffffff;
scrollbar-shadow-color:#ffffff;
scrollbar-darkshadow-color:#CDC7C9;
scrollbar-track-color:#ffffff;
background-color: #FFFFFF;
}
.style1 {
font-family: Tahoma, "Lucida Bright", Verdana;
font-size: 7pt;
color: #000000;
font-weight: bold;
}
-->
</style>
<link href="inter-home.css" rel="stylesheet" type="text/css">
<link href="calendario.css" rel="stylesheet" type="text/css">
<link href="txt_tabelas.css" rel="stylesheet" type="text/css">
</head>
<body>
<table border="0" align="center" cellspacing="0" cellpadding="0" height="100%" width="560">
<td valign="top" height="100%">
<iframe name="destaque" id="destaque" src="destaque.htm" width="100%" height="180" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="administracao" id="administracao" src="administracao.htm" width="100%" height="1780" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="marketing" id="marketing" src="marketing.htm" width="100%" height="2210" frameborder="0" cellpadding="0" cellspacing="0"> </iframe><u></u>
<iframe name="comunicacao" id="comunicacao" src="comunicacao.htm" width="100%" height="745" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="design" id="design" src="design.htm" width="100%" height="925" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="educacao" id="educacao" src="educacao.htm" width="100%" height="520" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="relacoes" id="relacoes" src="relacoes.htm" width="100%" height="660" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="entrevista" id="entrevista" src="entrevista.htm" width="100%" height="185" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="ti" id="ti" src="ti.htm" width="100%" height="945" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="midia" id="midia" src="midia.htm" width="100%" height="175" frameborder="0" cellpadding="0" cellspacing="0"> </iframe>
<iframe name="eventos" id="eventos" src="eventos.htm" width="100%" height="315" frameborder="0" cellpadding="0" cellspacing="0"> </iframe> </td>
<tr>
<td height="5" valign="top"><div align="center">
Aqui abaixo como eu faço para mandar imprimir tudo!
<input type="button" value="Imprimir Iframe" onClick="PrintIframe(destaque);"/>
</p>
</div></td>
<tr>
<td valign="top"> </td>
</table>
</body>
</html>
___________________________________________________________________________
Bem fico no aguardo de um ajuda valeu galera.
#2
Posted 13/03/2008, 12:29
simples, use o a função de novo. separando por ; (ponto-e-virgula). ficando uma coisa "linda", mas que dah certo.
Use quantas vezes quiser a function xD
/*DarkSign*/
<input type="button" value="Imprimir Iframe" onClick="PrintIframe(destaque);PrintIframe(iframe2);PrintIframe(iframe3);"/>
Use quantas vezes quiser a function xD
/*DarkSign*/
#3
Posted 13/03/2008, 12:41
Ai esta o problema pois aparece mais de uma vez para escolhar a impressora ou para dar oK na impressão...
Entende...
Entende...
#4
Posted 13/03/2008, 12:45
pois eh, infelizmente o método FrameInline.print(); é muito simples. Não conheço nenhum script avançado de impressão, mas tu não poderia montar um iframe com os conteúdos dos outros iframes? ou melhor, não poderia fazer uma página de impressão que imprimisse assim que aberta, com os iframes que tu deseja?
/*DarkSign*/
/*DarkSign*/
#5
Posted 13/03/2008, 12:48
então esta pagina que mandei para vc ver é a que carrega todos os iframes mas quando mando imprimir nesta pagina ela corta uns iframes e outros que são menores ela imprimi....
E ai sabe algum script que imprimi direitinho a pagina que carrega todos os iframes...????
E ai sabe algum script que imprimi direitinho a pagina que carrega todos os iframes...????
#6
Posted 13/03/2008, 12:52
kara, tenta usar o método do JS, window.print(); Esse metodo imprimirá a janela inteira que está sendo exibida.
no caso, vc colocaria no onLoad do body da página de impressão apenas assim:
/*DarkSign*/
no caso, vc colocaria no onLoad do body da página de impressão apenas assim:
onLoad="window.print();";
/*DarkSign*/
Edição feita por: DarkSign, 13/03/2008, 12:53.
#7
Posted 13/03/2008, 13:35
Então ai esta o problema ele corta as materias pela metada se as mesmas não cabe em uma folha A4....
E ai ferra tudo.....
E ai ferra tudo.....
#9
Posted 13/03/2008, 16:24
Mais um problema aqui o servidor só aceita asp....
Tem alguma outra solução para mim...????
hehhehehehe....
Tem alguma outra solução para mim...????
hehhehehehe....

#11
Posted 14/03/2008, 09:37
Valeu meu irmão vou pesquisar obrigado...
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)