Free Support Forum - aspose.com

Bullet points are changed after inserting HTML into document save to PDF using Java

We are using builder.insertHtml() to insert sections of text that a user has entered using a web html editor form. The html that is saved into the database is reasonably clean/simple.



When we use document.save(“name.doc”) the bullet points appear as normal default circular bullet points.



When we use document.save(“name.pdf”) the bullet points appear as hollow square.



I can’t see an easy way to change it so that the bullet points all appear as solid circles, is this simple to achieve, I can’t see where to do this from the documentation. Any pointers would be appreciated.



If the above description is not clear, let me know and I could put together a simple test case demonstrating the issue. (I have attached an example screenshot below)

Hi Jacob,

Thanks for your query. Please use the latest version of Aspose.Words for .NET. If you still face problem, please share your document and html for investigation purposes.

We downloaded the latest version just last week. Please see the following example code that demonstrates the problem we are having:

public class DocumentTest implements Command {
private String licenseData = “…”;
public DocumentTest(DataSource ds) throws IOException {

}

public void execute() throws IOException {

try {
License license = new License();
license.setLicense(new ByteArrayInputStream((licenseData).getBytes(“UTF-8”)));

Document d = new Document();
DocumentBuilder builder = new DocumentBuilder(d);
builder.insertHtml("(p>Example list:(/p>(ul>(li>one(/li>(li>two(/li>(li>three(/li>(/ul>");
d.save(“demo.pdf”);
d.save(“demo.doc”);
} catch(Exception e) {

throw new IOException(“Aspose throw an unknown error”, e);
}
}
}

Please note, I am having trouble getting the string with the html to come up in the forum, I have replaced the html so every “less than” symbol is written as (

Hi Jacob,

Thanks for sharing the information. I have tested the scenario with latest version of Aspose.Words for Java and have not found any issue. Please find the output files in attachment. It would be great if you please share your working environment like Operating system, JDK version etc for investigation purposes.

Please find attached a complete sample project that demonstrates the problem, we have tested on the following platforms:



Redhat 5 + 1.7.0_01

OS/X 10.7.4 + Java 1.6.0_33



We are about to test it on a windows machine as well.

Hi Jacob,

Thanks for sharing the information. I have managed to reproduce the same problem at my end. I have logged this issue as WORDSJAVA-572 in our issue tracking system. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSJAVA-572) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.