Foros del Web » Programando para Internet » ASPX (.net) »

word diseño impresion

Estas en el tema de word diseño impresion en el foro de ASPX (.net) en Foros del Web. Alguien sabe como se pone en version de impresion un documento word con asp.net yo quiero abrir un documento html con word pero el problema ...
  #1 (permalink)  
Antiguo 06/06/2006, 16:24
 
Fecha de Ingreso: noviembre-2004
Mensajes: 42
Antigüedad: 19 años, 5 meses
Puntos: 0
word diseño impresion

Alguien sabe como se pone en version de impresion un documento word con asp.net

yo quiero abrir un documento html con word pero el problema es que siempre lo abre con vista de diseño web y yo quiero que lo abra vista diseño impresion
  #2 (permalink)  
Antiguo 26/03/2008, 10:33
 
Fecha de Ingreso: febrero-2005
Mensajes: 34
Antigüedad: 19 años, 2 meses
Puntos: 0
Re: word diseño impresion

Yo estoy en la misma :S, me da q eso es cosa del programa y la única forma es covertirlo a word o rtf
  #3 (permalink)  
Antiguo 26/03/2008, 10:49
Avatar de Peterpay
Colaborador
 
Fecha de Ingreso: septiembre-2007
Ubicación: San Francisco, United States
Mensajes: 3.858
Antigüedad: 16 años, 8 meses
Puntos: 87
Re: word diseño impresion

Correccion esto es para vista de impresion desde la pagina
Cita:
Podrian jugar con javascript y dejar q el navegador reconociera el tipo

window.open('rutaarchivo.doc,'preview','height=600 ,width=915,top=50,left=50,scrollbars=1')

Aqui hay un articulo pero con asp.net 3.5

http://blog.maartenballiauw.be/post/...NQ-to-XML.aspx
Para lo q ustedes necesitan es jugar con los parametros del word como dice david_
__________________
Curso WF4
http://cursos.gurudotnet.com/ DF
Aprende HTML5
  #4 (permalink)  
Antiguo 27/03/2008, 12:48
 
Fecha de Ingreso: febrero-2005
Mensajes: 34
Antigüedad: 19 años, 2 meses
Puntos: 0
Re: word diseño impresion

He conseguido que abra como "Diseño de Impresión" directamente en el Word. Cambiando la cabecera por esto:

Cita:
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title></title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Print</w:View>
<w:DoNotHyphenateCaps/>
<w:PunctuationKerning/>
<w:DrawingGridHorizontalSpacing>9.35 pt</w:DrawingGridHorizontalSpacing>
<w:DrawingGridVerticalSpacing>9.35 pt</w:DrawingGridVerticalSpacing>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:7.5pt;
mso-bidi-font-size:8.0pt;
font-family:"Verdana";
mso-fareast-font-family:"Verdana";}
p.small
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:1.0pt;
mso-bidi-font-size:1.0pt;
font-family:"Verdana";
mso-fareast-font-family:"Verdana";}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1032">
<o:colormenu v:ext="edit" strokecolor="none"/>
</o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
En el medio aparece esto: <w:View>Print</w:View> que indica que abra en modo diseño de impresión, también se le pueden poner más parámetros como "<w:Zoom>100</w:Zoom>".

Añadir propiedades de documento:

Cita:
<![endif]--><!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>Pepito de los palotes</o:Author>
<o:LastAuthor>user</o:LastAuthor>
<o:Revision>2</o:Revision>
<o:TotalTime>18</o:TotalTime>
<o:LastPrinted>2007-09-24T16:01:00Z</o:LastPrinted>
<o:Created>2008-03-30T12:37:00Z</o:Created>
<o:LastSaved>2008-03-30T12:37:00Z</o:LastSaved>
<o:Pages>3</o:Pages>
<o:Words>93</o:Words>
<o:Characters>515</o:Characters>
<o:Lines>4</o:Lines>
<o:Paragraphs>1</o:Paragraphs>
<o:CharactersWithSpaces>607</o:CharactersWithSpaces>
<o:Version>12.00</o:Version>
</o:DocumentProperties>
</xml><![endif]-->

Añadir plantilla de encabezado y pie de página (guardarla con el word como htm):

Cita:
<style>
/* Page Definitions */
@page
{mso-footnote-separator:url("http://miurl.com/header.htm") fs;
mso-footnote-continuation-separator:url("http://miurl.com/header.htm") fcs;
mso-endnote-separator:url("http://miurl.com/header.htm") es;
mso-endnote-continuation-separator:url("http://miurl.com/header.htm") ecs;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;
mso-header-margin:0cm;
mso-footer-margin:0cm;
mso-title-page:yes;
mso-header:url("http://miurl.com/header.htm") h1;
mso-footer:url("http://miurl.com/header.htm") f1;
mso-first-header:url("http://miurl.com/header.htm") fh1;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
Para que se vea la plantilla htm hay que poner el código de la página entre "<div class=div.Section1>"

Última edición por david_; 31/03/2008 a las 01:54
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 05:15.