Foros del Web » Programación para mayores de 30 ;) » Java »

Creando Documentos RTF, parecidos a documentos de Texto similares a WORD

Estas en el tema de Creando Documentos RTF, parecidos a documentos de Texto similares a WORD en el foro de Java en Foros del Web. Cordial Saludo: Necesito conectarme a una base de datos MySQL en Windows/Linux y que haga consultas a través de JSP en Servidor Apache. (Esta parte ...
  #1 (permalink)  
Antiguo 18/04/2007, 20:01
 
Fecha de Ingreso: febrero-2007
Ubicación: Barranquilla, Colombia
Mensajes: 181
Antigüedad: 17 años, 2 meses
Puntos: 3
Creando Documentos RTF, parecidos a documentos de Texto similares a WORD

Cordial Saludo:

Necesito conectarme a una base de datos MySQL en Windows/Linux y que haga consultas a través de JSP en Servidor Apache. (Esta parte ya la se hacer)
Con el resultado necesito crear impresiones de documentos de unos resultados pero con saltos de pagina, como lo puedo hacer, al estilo WORD, sin embargo utilizar WORD me limitaría al mundo Windows.

Esta impresion, sería algo así:
Que tenga la capacidad de crear tablas con celdas, no limitadas a la forma cuadriculada, ejemplo tabla de 3 columnas * 2 filas.
Sino por decirlo asi un ejemplo, la primera fila con tres columnas o celdas, la segunda fila con 5 columnas o celdas, la cuarta con una sola columna o celda.
la primera columna con 3 filas o celdas, la segunda columna con una fila o celda, la tercera fila con 7 filas co celdas.
Pero que su borde sea cuadrado.

No se si me haga entender, como si combinara celdas en Excel en Windows Linux.

Y adjuntarles imágenes de manera controlada.
Necesito es poder organizar la informacion en paginas tipo carta u oficio.


Gracias,
  #2 (permalink)  
Antiguo 04/05/2007, 14:41
 
Fecha de Ingreso: febrero-2007
Ubicación: Barranquilla, Colombia
Mensajes: 181
Antigüedad: 17 años, 2 meses
Puntos: 3
Aquí hay una posible respuesta

Código PHP:
<%@ include file="Settings.jsp" %>
<%@ 
page session="false" %>
<%@ 
page import="java.sql.*" %>
<%@ 
page import="java.io.*" %>

<%
String sNewBrackets "{";
String sEndBrackets "}";

String sRTFHeader "\\rtf1";
String sRTFCharSet "\\ansi";
String sRTFDeff "\\deff0 \n";
String sRTFDLang "\\deff0 \n";

String sNPage "\n \\page \n";
String sNLine "\n \\line";
String sNPar "\\par ";

String sFontTable "\\fonttbl \n";
String sFontS24 "\\fs24 ";
String sFontN0 "\\f0 ";
String sFontN1 "\\f1 ";

//Los tipos de feuntes se definen a continuación
String sFMNil  =" "+sNewBrackets+"\\f0\\fnil\\fprq1\\fcharset128 TlwgMono;"+sEndBrackets+"\n";
String sFMSwiss=" "+    sNewBrackets+"\\f1\fswiss\\fprq1\\fcharset128 Bitstream Vera Sans Mono;"+sEndBrackets+"\n";
//Se Crea la tabla con los tipos de fuentes definidos
String MyFontTable sNewBrackets+sFontTable+sFMNil+sFMSwiss+sEndBrackets+"\n";

//Los colores se colocan en una lista y se seleccionan según su posición
//cb# para el color del Fondo y cf# para el color del frente
String sColorTable "\\colortbl;\n";
String sColorBlack " \\red0\\green0\\blue0;\n";
String sColorWhite " \\red255\\green255\\blue255;\n";
String sColorRed =     " \\red255\\green0\\blue0;\n";
String sColorGreen " \\red0\\green255\\blue0;\n";
String sColorBlue " \\red0\\green0\\blue255;\n";

String MyColors sColorBlack+sColorWhite+sColorRed+sColorGreen+sColorBlue;
//Se crea la tabla con los colores definciods anteriormente
String MyColorTable sNewBrackets+sColorTable+MyColors+sEndBrackets+"\n";

//Formatos Especiales
String sRTF_BN "\\b ";
String sRTF_IN "\\i ";
String sRTF_UN "\\ul ";
//Quitar Formatos Especiales
String sRTF_BF "\\b0 ";
String sRTF_IF "\\i0 ";
String sRTF_UF "\\ul0 ";

//Alineacion
String sRTF_AL "\\ql ";
String sRTF_AR "\\qr ";
String sRTF_AC "\\qc ";
String sRTF_AJ "\\qj ";
String sRTF_AD "\\qd ";

String sRTFTableO "\\trowd\\trql \n";                            //Apertura de Definicion de Tabla
String sRTFTableH "\\trowd\\trql\\trhdr \n";                //Cabecera de Definicion de Tabla
String sRTFTableC "\\pard\\intbl\\pard\\plain \n";    //Cierre de Definicion de Tabla
String sRTFTableE "\\row\\pard \n";                                 //Fin de Llenado de Tabla

String sRTFRowTL "\\trbrdrt\\brdrdb\brdrw15\\brdrcf1 \\trbrdrl\\brdrdb\\brdrw15\\brdrcf1";
String sRTFRowBR "\\trbrdrb\\brdrdb\brdrw15\\brdrcf1 \\trbrdrr\\brdrdb\\brdrw15\\brdrcf1";
String sRTFRowHV "\\trbrdrh\\brdrdb\brdrw15\\brdrcf1 \\trbrdrv\\brdrdb\\brdrw15\\brdrcf1";

String sRTFCellH "\\clbrdrt\\brdrs\\brdrw1\\brdrcf1 \\clbrdrl\\brdrs\\brdrw1\\brdrcf1 ";
String sRTFCellV "\\clbrdrb\\brdrs\\brdrw1\\brdrcf1 \\clbrdrr\\brdrs\\brdrw1\\brdrcf1 ";
String sRTFCellW "\\cellx1606 \n";
String sRTFCellO "\\pard\\plain\\intbl\\ltrpar\\qc ";
String sRTFCellC "\\cell \n";
String sNewBrackets "{";
String sEndBrackets "}";

String sRTFHeader "\\rtf1";
String sRTFCharSet "\\ansi";
String sRTFDeff "\\deff0 \n";
String sRTFDLang "\\deff0 \n";

String sNPage "\n \\page \n";
String sNLine "\n \\line";
String sNPar "\\par ";

String sFontTable "\\fonttbl \n";
String sFontS24 "\\fs24 ";
String sFontN0 "\\f0 ";
String sFontN1 "\\f1 ";

//Los tipos de fuentes se definen a continuacion
String sFMNil  =" "+sNewBrackets+"\\f0\\fnil\\fprq1\\fcharset128 TlwgMono;"+sEndBrackets+"\n";
String sFMSwiss=" "+    sNewBrackets+"\\f1\fswiss\\fprq1\\fcharset128 Bitstream Vera Sans Mono;"+sEndBrackets+"\n";
//Se Crea la tabla con los tipos de fuentes definidos
String MyFontTable sNewBrackets+sFontTable+sFMNil+sFMSwiss+sEndBrackets+"\n";

//Los colores se colocan en una lista y se seleccionan según su posición
//cb# para el color del Fondo y cf# para el color del frente
String sColorTable "\\colortbl;\n";
String sColorBlack " \\red0\\green0\\blue0;\n";
String sColorWhite " \\red255\\green255\\blue255;\n";
String sColorRed =     " \\red255\\green0\\blue0;\n";
String sColorGreen " \\red0\\green255\\blue0;\n";
String sColorBlue " \\red0\\green0\\blue255;\n";

String MyColors sColorBlack+sColorWhite+sColorRed+sColorGreen+sColorBlue;
//Se crea la tabla con los colores definciods anteriormente
String MyColorTable sNewBrackets+sColorTable+MyColors+sEndBrackets+"\n";

//Formatos Especiales
String sRTF_BN "\\b ";
String sRTF_IN "\\i ";
String sRTF_UN "\\ul ";
//Quitar Formatos Especiales
String sRTF_BF "\\b0 ";
String sRTF_IF "\\i0 ";
String sRTF_UF "\\ul0 ";

//Alineacion
String sRTF_AL "\\ql ";
String sRTF_AR "\\qr ";
String sRTF_AC "\\qc ";
String sRTF_AJ "\\qj ";
String sRTF_AD "\\qd ";

String sRTFTableO "\\trowd\\trql \n";                            //Apertura de Definicion de Tabla
String sRTFTableH "\\trowd\\trql\\trhdr \n";                //Cabecera de Definicion de Tabla
String sRTFTableC "\\pard\\intbl\\pard\\plain \n";    //Cierre de Definicion de Tabla
String sRTFTableE "\\row\\pard \n";                                 //Fin de Llenado de Tabla

String sRTFRowTL "\\trbrdrt\\brdrdb\brdrw15\\brdrcf1 \\trbrdrl\\brdrdb\\brdrw15\\brdrcf1";
String sRTFRowBR "\\trbrdrb\\brdrdb\brdrw15\\brdrcf1 \\trbrdrr\\brdrdb\\brdrw15\\brdrcf1";
String sRTFRowHV "\\trbrdrh\\brdrdb\brdrw15\\brdrcf1 \\trbrdrv\\brdrdb\\brdrw15\\brdrcf1";

String sRTFCellH "\\clbrdrt\\brdrs\\brdrw1\\brdrcf1 \\clbrdrl\\brdrs\\brdrw1\\brdrcf1 ";
String sRTFCellV "\\clbrdrb\\brdrs\\brdrw1\\brdrcf1 \\clbrdrr\\brdrs\\brdrw1\\brdrcf1 ";
String sRTFCellW "\\cellx1606 \n";
String sRTFCellO "\\pard\\plain\\intbl\\ltrpar\\qc ";
String sRTFCellC "\\cell \n"
  #3 (permalink)  
Antiguo 04/05/2007, 14:47
 
Fecha de Ingreso: febrero-2007
Ubicación: Barranquilla, Colombia
Mensajes: 181
Antigüedad: 17 años, 2 meses
Puntos: 3
Re: Creando Documentos RTF, parecidos a documentos de Texto similares a WORD

Código PHP:


%>
<%
//fprqN:Specifies the pitch of a font in the font table.
//String strDir = "usr/local/tomcat/webapps/ROOT/";
//String defDir = "/home/cepagi/Documents/";
out.println(defDir+"<P>");

File file2 = new File(defDir+"GeneratedRTF2.RTF");

FileWriter fWriter;
BufferedWriter bWriter;
try {
      
fWriter = new FileWriter(file2);
      
bWriter = new BufferedWriter(fWriter);
      
bWriter.write(sNewBrackets+sRTFHeader+sRTFCharSet+sRTFDeff+MyFontTable+MyColorTable);
            
bWriter.write("\\cf0\\cb1"+sFontN0+sFontS24"Las Palabras\\par \n");
            
bWriter.write("\\cf1\\cb0"+sFontN0+"\\i\\fs20""Primera Palabra, italica con \\\\i\\par \n");
            
bWriter.write("\\cf1\\cb0"+sFontN0+"\\ul\\fs16""Segunda Palabra, subrayada con \\\\ul\\par \n");
            
bWriter.write("\\cf1\\cb0"+sFontN0+"\\b\\fs48""Tercera Palabra, Negrita con \\\\b \n");

            
//bWriter.write("\\cf0\\cb1"+sFontN1+sFontS24+ "Otra Hoja con \\\\page\\par \n");
            
bWriter.write("\\cf3\\cb0"+sFontN1+"\\i0\\fs20""Quitar, Italica con \\\\i0\\par \n");
            
bWriter.write("\\cf4\\cb0"+sFontN1+"\\ul0\\fs16""Quitar Subrayada con \\\\ul0\\par \n");
            
bWriter.write("\\cf5\\cb0"+sFontN1+"\\b0\\fs48""Quitar, Negrita con \\\\b0 \n");
            
bWriter.write("\\par \n");
            
bWriter.write("\\cf3\\cb0"+sFontN1+"\\qc\\fs12""Centrada con \\\\qc \\par\n");
            
bWriter.write("\\cf4\\cb0"+sFontN1+"\\qd\\fs12""Distribuida con \\\\qd \\par\n");
            
bWriter.write("\\cf5\\cb0"+sFontN1+"\\fs12");
            
bWriter.write("\\ql Izquierda con \\\\ql\\par \n");
            
bWriter.write("\\qr Derecha con \\\\qr\\par \n");
            
bWriter.write("\\par \n");
            
bWriter.write(sNPage);
            
bWriter.write("\n");
            
//Se hará una tabla de 3x3,Mezclando (1,3) con (2,3) y (3,1) con (3,2)
            //Fila 1
            //\InicioDeTabla[\EspacioTabla][\PosicionTabla]\JustificacionTabla[\FilaCabecera]
            
bWriter.write("\\trowd\\trgaph100\\trleft1000\\trqc\\trhdr \n");
            
//\BordedeFila\TipoDeBorde\AnchoDeBorde\ColorDeBorde
            
bWriter.write("\\trbrdrt\\brdrdb\\brdrw15\\brdrcf3 \\trbrdrl\\brdrdb\\brdrw15\\brdrcf4 ");
            
bWriter.write("\\trbrdrb\\brdrdb\\brdrw15\\brdrcf5 \\trbrdrr\\brdrdb\\brdrw15\\brdrcf3 ");
            
bWriter.write("\\trbrdrh\\brdrdb\\brdrw15\\brdrcf4 \\trbrdrv\\brdrdb\\brdrw15\\brdrcf5 ");
            
bWriter.write("\n");
            
//\BordeDeCelda\TipoDeBorde\AnchoDeBorde\ColorDeBorde\[AlineacionVertical]);
            //Celda(1,1)
            
bWriter.write("\\clbrdrt\\brdrs\\brdrw1\\brdrcf1 \\clbrdrl\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\clbrdrb\\brdrs\\brdrw1\\brdrcf1 \\clbrdrr\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\cellx3000 \n");
            
//Celda(1,2)
            
bWriter.write("\\clbrdrt\\brdrs\\brdrw1\\brdrcf1 \\clbrdrl\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\clbrdrb\\brdrs\\brdrw1\\brdrcf1 \\clbrdrr\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\cellx6000 \n");
            
//Celda(1,3)
            
bWriter.write("\\clvmgf \n");
            
bWriter.write("\\clbrdrt\\brdrs\\brdrw1\\brdrcf1 \\clbrdrl\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\clbrdrb\\brdrs\\brdrw1\\brdrcf1 \\clbrdrr\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\cellx9000 \n");
            
//Fin de Definición de Tabla (Fila));
            
bWriter.write("\\pard\\intbl\\pard\\plain \n");
            
//Inicio de Llenado de Celda (1,1)
            
bWriter.write("\\pard\\plain\\intbl\\ltrpar\\ql ");
            
//Formato de Celda
            //\ColorFrente\ColorFondo\TipoFuente\Tamaño
            
bWriter.write("\\cf3\\cb2"+"\\f1"+"\\fs24");
            
//Contenido
            
bWriter.write("CELDA (1,1)");
            
//Fin de Llenado de Celda (1,1)
            
bWriter.write("\\cell \n");
            
//Inicio de Llenado de Celda (1,2)
            
bWriter.write("\\pard\\plain\\intbl\\ltrpar\\ql ");
            
bWriter.write("\\cf4\\cb2"+"\\f1"+"\\fs24");
            
bWriter.write("CELDA (1,2)");
            
bWriter.write("\\cell \n");
            
bWriter.write("\\pard\\plain\\intbl\\ltrpar\\qd ");
            
bWriter.write("\\cf5\\cb2"+"\\f1"+"\\fs24");
            
bWriter.write("CELDA (1,3)");
            
bWriter.write("\\cell \n");
            
//Fin de llenado de Tabla (o Fila 1)
            
bWriter.write("\\row\\pard \n");
            
bWriter.write("\n");
            
//Fila 2
            
bWriter.write("\\trowd\\trgaph100\\trleft1000\\trqc \n");
            
//Celda(2,1)
            
bWriter.write("\\clbrdrt\\brdrs\\brdrw1\\brdrcf1 \\clbrdrl\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\clbrdrb\\brdrs\\brdrw1\\brdrcf1 \\clbrdrr\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\cellx3000 \n");
            
//Celda(2,2)
            
bWriter.write("\\clbrdrt\\brdrs\\brdrw1\\brdrcf1 \\clbrdrl\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\clbrdrb\\brdrs\\brdrw1\\brdrcf1 \\clbrdrr\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\cellx6000 \n");
            
//Celda(2,3)
            
bWriter.write("\\clvmgr \n");
            
bWriter.write("\\clbrdrt\\brdrs\\brdrw1\\brdrcf1 \\clbrdrl\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\clbrdrb\\brdrs\\brdrw1\\brdrcf1 \\clbrdrr\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\cellx9000 \n");
            
bWriter.write("\\pard\\intbl\\pard\\plain \n");
            
bWriter.write("\\pard\\plain\\intbl\\ltrpar\\qr ");

            
bWriter.write("\\cf1\\cb2"+"\\f2"+"\\fs20");
            
bWriter.write("CELDA (2,1)");
            
bWriter.write("\\cell \n");
            
bWriter.write("\\pard\\plain\\intbl\\ltrpar\\qr ");
            
bWriter.write("\\cf1\\cb2"+"\\f2"+"\\fs24");
            
bWriter.write("CELDA (2,2)");
            
bWriter.write("\\cell \n");
            
//Para (2,3 )No se define formato ni inicio de llenado, solo el cierre
            
bWriter.write("\\cell \n");
            
bWriter.write("\\row\\pard \n");
            
bWriter.write("\n");
            
//Fila 3
            
bWriter.write("\\trowd\\trgaph100\\trleft1000\\trqc \n");
            
//Celda(2,1)
            //La combinación horizontal se hace definiendo solo una celda
            
bWriter.write("\\clbrdrt\\brdrs\\brdrw1\\brdrcf1 \\clbrdrl\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\clbrdrb\\brdrs\\brdrw1\\brdrcf1 \\clbrdrr\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\cellx6000 \n");
            
//Celda(2,3)
            
bWriter.write("\\clbrdrt\\brdrs\\brdrw1\\brdrcf1 \\clbrdrl\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\clbrdrb\\brdrs\\brdrw1\\brdrcf1 \\clbrdrr\\brdrs\\brdrw1\\brdrcf1 ");
            
bWriter.write("\\cellx9000 \n");
            
bWriter.write("\\pard\\intbl\\pard\\plain \n");
            
bWriter.write("\\pard\\plain\\intbl\\ltrpar\\qc ");
            
bWriter.write("\\cf1\\cb2"+"\\f2"+"\\fs20");
            
bWriter.write("CELDA (2,1)");
            
bWriter.write("\\cell \n");
            
bWriter.write("\\pard\\plain\\intbl\\ltrpar\\qc ");
            
bWriter.write("\\cf1\\cb2"+"\\f2"+"\\fs24");
            
bWriter.write("CELDA (3,3)");
            
bWriter.write("\\cell \n");
            
bWriter.write("\\row\\pard \n");
            
bWriter.write(sNPage);
            
bWriter.write("\\cf1\\cb2"+sFontN1+sFontS24+"Hoja 3 con \\\\page, Colores de Palabras y Parrafos\\par");
            
bWriter.write("\\cbpat2\\cfpat3"+sFontN1+sNPar+"\\fs18\\\\cbpat2    \\\\cfpat3 \n");
            
bWriter.write("\\cbpat2\\cfpat4"+sFontN1+sNPar+"\\fs18\\\\cbpat2    \\\\cfpat4 \n");
            
bWriter.write("\\cbpat2\\cfpat5"+sFontN1+sNPar+"\\fs18\\\\cbpat2    \\\\cfpat5 \n");
            
bWriter.write("\\cbpat3\\cfpat2"+sFontN1+sNPar+"\\fs18\\\\cbpat3    \\\\cfpat2 \n");
            
bWriter.write("\\cbpat4\\cfpat2"+sFontN1+sNPar+"\\fs18\\\\cbpat4    \\\\cfpat2 \n");
            
bWriter.write("\\cbpat5\\cfpat2"+sFontN1+sNPar+"\\fs18\\\\cbpat5    \\\\cfpat2 \n");

            
bWriter.write("\\chcbpat3\\cfpat2"+sFontN1+sNPar+"\\fs18\\\\chcbpat3    \\\\cfpat2 \n");
            
bWriter.write("\\chcbpat4\\cfpat2"+sFontN1+sNPar+"\\fs18\\\\chcbpat4    \\\\cfpat2 \n");
            
bWriter.write("\\chcbpat5\\cfpat2"+sFontN1+sNPar+"\\fs18\\\\chcbpat5    \\\\cfpat2 \n");
            
bWriter.write("\\chcbpat2\\cfpat3"+sFontN1+sNPar+"\\fs18\\\\chcbpat2    \\\\cfpat3 \n");
            
bWriter.write("\\chcbpat2\\cfpat4"+sFontN1+sNPar+"\\fs18\\\\chcbpat2    \\\\cfpat4 \n");
            
bWriter.write("\\chcbpat2\\cfpat5"+sFontN1+sNPar+"\\fs18\\\\chcbpat2    \\\\cfpat5 \n");

            
bWriter.write("\\chcfpat2\\cbpat3"+sFontN1+sNPar+"\\fs18\\\\chcfpat2    \\\\cbpat3 \n");
            
bWriter.write("\\chcfpat2\\cbpat4"+sFontN1+sNPar+"\\fs18\\\\chcfpat2    \\\\cbpat4 \n");
            
bWriter.write("\\chcfpat2\\cbpat5"+sFontN1+sNPar+"\\fs18\\\\chcfpat2    \\\\cbpat5 \n");
            
bWriter.write("\\chcfpat3\\cbpat2"+sFontN1+sNPar+"\\fs18\\\\chcfpat3    \\\\cbpat2 \n");
            
bWriter.write("\\chcfpat4\\cbpat2"+sFontN1+sNPar+"\\fs18\\\\chcfpat4    \\\\cbpat2 \n");
            
bWriter.write("\\chcfpat5\\cbpat2"+sFontN1+sNPar+"\\fs18\\\\chcfpat5    \\\\cbpat2 \n");

            
bWriter.write("\\chcfpat3\\chcbpat2"+sFontN1+sNPar+"\\fs18\\\\chcfpat3    \\\\chcbpat2 \n");
            
bWriter.write("\\chcfpat4\\chcbpat2"+sFontN1+sNPar+"\\fs18\\\\chcfpat4    \\\\chcbpat2 \n");
            
bWriter.write("\\chcfpat5\\chcbpat2"+sFontN1+sNPar+"\\fs18\\\\chcfpat5    \\\\chcbpat2 \n");
            
bWriter.write("\\chcfpat1\\chcbpat3"+sFontN1+sNPar+"\\fs18\\\\chcfpat2    \\\\chcbpat3 \n");
            
bWriter.write("\\chcfpat1\\chcbpat4"+sFontN1+sNPar+"\\fs18\\\\chcfpat2    \\\\chcbpat4 \n");
            
bWriter.write("\\chcfpat1\\chcbpat5"+sFontN1+sNPar+"\\fs18\\\\chcfpat2    \\\\chcbpat5 \n");
            
bWriter.write(sEndBrackets);

      
bWriter.close();
      
fWriter.close();
out.println("<a href=\"http://192.168.0.1:8080/GeneratedRTF2.RTF\"><CODE>GeneratedRTF2.RTF</CODE></a><P>");
out.println("<a href=\"GeneratedRTF2.RTF\"><CODE>Relativo GeneratedRTF2.RTF</CODE></a><P>");

out.println("<a href=\"GeneratedRTF2.RTF\" TYPE=\"application/java\"> TIPO Aplicación GeneratedRTF2.RTF</CODE></a><P>");
//out.println("<OBJECT file=\"GeneratedRTF2.RTF\" TYPE=\"href\">  TIPO OBJECT GeneratedRTF2.RTF</OBJECT><P>");
out.println("<FORM ACTION=WriteReadFile.jsp ENCTYPE=\"MULTIPART/FORM-DATA\" METHOD=POST>");
out.println("<BR>Select file to upload <INPUT TYPE=FILE Name=Filename>");
out.println("<INPUT TYPE=SUBMIT VALUE=\"Upload\">");
out.println("</FORM>");

    } catch (
IOException e) {
      
e.printStackTrace();
    }

%>

</
TABLE>
</
CENTER>
</
BODY>
</
HTML
  #4 (permalink)  
Antiguo 04/05/2007, 14:50
 
Fecha de Ingreso: febrero-2007
Ubicación: Barranquilla, Colombia
Mensajes: 181
Antigüedad: 17 años, 2 meses
Puntos: 3
Una pequeña ayuda

/*
\langN Applies a language to a character. N is a number corresponding to a language. The \plain control word resets the language property to the language defined by \deflangN in the document properties.
\langnpN Applies a language to a character. N is a number corresponding to a language. The \plain control word resets the language property to the language defined by \deflangN in the document properties. It is identical to \langN, but needed when \noproof is written together with \lang1024 in order to preserve the language of the text that is not being checked for spelling or grammar. Usually follows \langN.

*/
/*
Tablas
//InicioDeTabla
\trowd Sets table row defaults.

//EspacioTabla
\trgaphN Half the space between the cells of a table row in twips.

//PosicionTabla
\trleftN Position in twips of the leftmost edge of the table with respect to the left edge of its column.

//JustificacionTabla
\trqc Centers a table row with respect to its containing column.
\trql Left-justifies a table row with respect to its containing column.
\trqr Right-justifies a table row with respect to its containing column.
//FilaCabecera
\trhdr Table row header. This row should appear at the top of every page on which the current table appears.

//AltodeFila
\trrhN Height of a table row in twips. When 0, the height is sufficient for all the text in the line; when positive, the height is guaranteed to be at least the specified height; when negative, the absolute value of the height is used, regardless of the height of the text in the line.

<rowpad> (\trpaddl & \trpaddfl?)? &
(\trpaddt & \trpaddft?)? &
(\trpaddb & \trpaddfb?)? &
(\trpaddr & \trpaddfr?)?

\trpaddbN Default bottom cell margin or padding for the row.
\trpaddlN Default left cell margin or padding for the row.
\trpaddrN Default right cell margin or padding for the row.
\trpaddtN Default top cell margin or padding for the row.

SINTAXIS:
\InicioDeTabla[\EspacioTabla][\PosicionTabla]\JustificacionTabla[\FilaCabecera]

\cell Denotes the end of a table cell.
\row Denotes the end of a row.

\cellxN Defines the right boundary of a table cell, including its half of the space between cells.

//MezclaVerticalCelda
//(Recuérdese que las celdas se definen por Filas)
En el mismo orden de celdas ubicadas dentro de la primera Fila a mezclar, antes de la definición de la primera celda mezclada verticalmente se coloca \clvmgf.
En el mismo orden de celdas ubicadas en la siguiente fila, antes de la definición de la siguiente celda mezclada verticalmente se coloca \clvmrg, como si fuesen de la misma columna. La celda que podrá tener valor será la ubicada en la primera fila, es decir, a la que se le colocó \clvmgf y se inicia, llena y cierra normalmente.
Cuando se vayan a ingresar los valores de las respectivas celdas de una Fila (que contenga una celda mezclada verticalmente y que correspondan a \clvmrg), no se coloca el inicio de llenado de celda, es decir, no se coloca "\\pard\\plain\\intbl\\ltrpar\\qc ", mucho menos el valor a contener, pero sÃ* se coloca el cierre "\\cell \n".

\clmgf The first cell in a range of table cells to be merged.
\clmrg Contents of the table cell are merged with those of the preceding cell.
\clvmgf The first cell in a range of table cells to be vertically merged.
\clvmrg Contents of the table cell are vertically merged with those of the preceding cell.

//TipoDeBorde
\brdrs Single-thickness border.
\brdrth Double-thickness border.
\brdrdb (Double border), \brdrdot(Dotted border), \brdrdash(Dashed border)
\brdrhair (Hairline border), \brdrinset(Inset border), \brdroutset(Outset border)
\brdrtriple (Triple border)

//AnchoDeBorde
\brdrwN N is the width in twips of the pen used to draw the paragraph border line. N cannot be greater than 75. To obtain a larger border width, the \brdth control word can be used to obtain a width double that of N.

//ColorDeBorde
\brdrcfN N is the color of the paragraph border, specified as an index into the color table in the RTF header.

//BordedeFila
\trbrdrt Table row border top.
\trbrdrl Table row border left.
\trbrdrb Table row border bottom.
\trbrdrr Table row border right.
\trbrdrh Table row border horizontal (inside).
\trbrdrv Table row border vertical (inside).

SINTAXIS:
\BordedeFila\TipoDeBorde\AnchoDeBorde\ColorDeBorde

//BordeDeCelda
//Las celdas podrÃ*an hacerse con dos lados (izquierdo e inferior), los faltantes con los respectivos lados de las celdas contiguas
\clbrdrb Bottom table cell border.
\clbrdrt Top table cell border.
\clbrdrl Left table cell border.
\clbrdrr Right table cell border.

//AlineacionVertical
\clvertalt Text is top-aligned in cell (the default).
\clvertalc Text is centered vertically in cell.
\clvertalb Text is bottom-aligned in cell.

SINTAXIS:
\BordeDeCelda\TipoDeBorde\AnchoDeBorde\ColorDeBord e\[AlineacionVertical]

\nestcell End of nested table cell.
\row End of table row.
\nestrow End of nested table row.
\par End of paragraph.
\sect End of section and paragraph.
\page Required page break.
\column Required column break.
\line Required line break (no paragraph break).
\pagebb Break page before the paragraph.
\par New paragraph.
\pard Resets to default paragraph properties.

\plain Reset font (character) formatting properties to a default value defined by the application (for example, bold, underline and italic are disabled; font size is reset to 12 point). The associated font (character) formatting properties (described in the section Associated Character Properties of this Specification) are also reset.

\deftabN Default tab width in twips (the default is 720).

The \intbl paragraph-formatting control word identifies the paragraph as part of a table.

\rtlch The character data following this control word will be treated as a right-to-left run.
\ltrch The character data following this control word will be treated as a left-to-right run (the default).

//SentidoDePrecedencia
\rtlpar Text in this paragraph will be displayed with right-to-left precedence.
\ltrpar Text in this paragraph will be displayed with left-to-right precedence (the default).

//ColorDePalabra
\chcfpatN N is the color of the background pattern, specified as an index into the document’s color table.
\chcbpatN N is the fill color, specified as an index into the document's color table.

//ColorParagrafo
\cfpatN N is the fill color, specified as an index into the document's color table.
\cbpatN N is the background color of the background pattern, specified as an index into the document's color table.

\afsN Associated font size in half-points (the default is 24).

Control word & Meaning
\loch Specifies a run of the characters in the low-ANSI (0x00–0x7F) area.
\hich For the characters in the high-ANSI (0x80–-0xFF) area.
\dbch Specifies a run of the double-byte characters.

SINTAXIS:
\intbl\SentidoDePrecedencia\ColorDePalabra\ColorPa ragrafo\Alineacion\afsN

*/
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 20:11.