I am converting a HTML file to a PDF file.  I have a table in the HTML file. I can use width or colspan because when you convert it, it don’t show anything correct. I have tried with width=30 and width=30%. I tried with colspan=2,3,4… but the problems is that the first colums is double size than the rest of the columns… any idea?.

The table in HTML is:

 

<table width="100.0%" align="left" border="1">

<tr>

<td>

 

</td>

<td>

 

</td>

<td>

 

</td>

</tr>

<tr>

<td>

Nombre y Apellidos

</td>

<td>

MARIA DEL PILAR HERNANDEZ CASTRO

</td>

<td>

 

</td>

</tr>

<tr>

<td>

NHC

</td>

<td>

1954

</td>

<td>

 

</td>

</tr>

<tr>

<td>

Fecha de nacimiento

</td>

<td>

26/02/79

</td>

<td>

 

</td>

</tr>

<tr>

<td>

Tel&#233;fono

</td>

<td>

291853

</td>

<td>

 

</td>

</tr>

<tr>

<td>

Fecha de ingreso

</td>

<td>

24/04/04

</td>

<td>

 

</td>

</tr>

<tr>

<td>

Fecha de alta

</td>

<td>

27/04/04

</td>

<td>

 

</td>

</tr>

<tr>

<td>

Centro

</td>

<td>

H. MATERNAL

</td>

<td>

 

</td>

</tr>

<tr>

<td>

Centro de salud

</td>

<td>

 

</td>

<td>

 

</td>

</tr>

<tr>

<td>

Unidad

</td>

<td>

3&#170; MATERNIDAD

</td>

<td>

 

</td>

</tr>

<tr>

<td>

Cama

</td>

<td>

2303A

</td>

<td>

 

</td>

</tr>

<tr>

<td>

Tel&#233;fono de la unidad

</td>

<td>

957010073

</td>

<td>

 

</td>

</tr>

</table>

 

 

And I convert it with:

OutputStream SalidaPdf= new FileOutputStream(SalidaPdfTemp.getAbsoluteFile());    PdfWriter.getInstance(doc,SalidaPdf);

 doc.open();

 doc.resetPageCount();

 HeaderFooter footer = new HeaderFooter(new Phrase("Página: "), true);

 doc.setFooter(footer);

try{

    HtmlParser.parse(doc,new FileInputStream(temp.getAbsoluteFile()));

}catch(){}

 

doc.close()

Reply via email to