
Untitled
By: a guest on
May 5th, 2012 | syntax:
None | size: 0.46 KB | hits: 11 | expires: Never
private void crearPDFCarta(String nombreArchivo, String contenidoCarta) throws DocumentException, IOException {
Document documento = new Document();
PdfWriter.getInstance(documento, new FileOutputStream(nombreArchivo));
documento.open();
List<Element> objects = HTMLWorker.parseToList( new StringReader( contenidoCarta ), null );
for (Element element : objects){
documento.add( element );
}
documento.close();
}