Hi
I am using aspose.words to convert html to pdf file.
Please find html and code to invoke aspose words library here.
Tier</t
Tier
Tier Value
Rate
<=
100%
3%
>
100%
5%
SignHere
h>
Tier Value
Rate
<=
100%
3%
>
100%
5%
SignHere
API that calls Aspose Words
public static void generateAsposePDFFromHtml(String html) throws Exception {
HttpURLConnection urlConnection = null;
ByteArrayInputStream input = new ByteArrayInputStream(html.getBytes(“UTF-8”));
com.aspose.words.LoadOptions loadOptions = new com.aspose.words.HtmlLoadOptions();
loadOptions.setLoadFormat(com.aspose.words.LoadFormat.HTML);
loadOptions.setEncoding(Charset.forName(“UTF-8”));
com.aspose.words.Document doc = new com.aspose.words.Document(input, loadOptions);
File localFile = new File(“AsposePDF.pdf”);
BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(localFile));
//out = new ByteArrayOutputStream();
doc.save(outputStream, com.aspose.words.SaveFormat.PDF);
}
Is there any connection that I need to close after generating PDF document?
PDF is accessible only if I stop application server.
Thanks