Erro de Compilação: HtmlParser

0 respostas
V

Bom dia amigos, estou tentando converter um documento em html para pdf e dá o seguinte erro de compilação:

Compiling pcrbp001.java
pcrbp001.java:531: cannot find symbol
symbol : class HtmlParser
location: package com.lowagie.text.html
com.lowagie.text.html.HtmlParser.parse(document,source);

Meu código é:

&html2 = “This is my <strong>hola</strong> string”

try{

com.lowagie.text.Document document = new com.lowagie.text.Document(com.lowagie.text.PageSize.A4, 80, 50, 30, 65);

com.lowagie.text.pdf.PdfWriter.getInstance(document, new java.io.FileOutputStream(“D:\test.pdf”));  document.open();

org.xml.sax.InputSource source = new org.xml.sax.InputSource(new java.io.StringReader([!&html2!]));

com.lowagie.text.html.HtmlParser.parse(document,source);

document.close();

}catch(java.lang.Exception e){

System.out.println(“Error creating pdf”);

}

Obrigada

Val

Criado 10 de abril de 2008
Respostas 0
Participantes 1