(1)
Ligne
Ligne
(1)
Ligne
Ligne
Hi
Thanks for your request. I tried converting your document to HTML using the latest version of Aspose.Words for Java (10.2.0) and as I can see, the output looks closer to the original HTML. Please see the attached screenshot.
If it is not what you would like to get, please provide us full code you are using for converting your document to HTML. We will check it and provide you more information.
Best regards,
Hi,
Hi
Thanks for your request. Please try to modify your code as shown below:
private void remplacerPastille(Paragraph para, Border leftBorder)
{
Shape shape = (Shape)para.getChild(NodeType.SHAPE, 0, true);
leftBorder.clearFormatting();
if (shape != null)
{
try
{
Paragraph sousParagraph = (Paragraph)para.getChild(NodeType.PARAGRAPH, 0, true);
if (sousParagraph != null)
{
sousParagraph.getParagraphFormat().setStyleName("StylePastille");
}
countPastille++;
Run run = (Run)para.getChild(NodeType.RUN, 0, true);
if (run != null)
{
run.setText("(" + countPastille + ") ");
}
para.prependChild(run);
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
}
Hope this helps.
Best regards,
Ok, I’ve tried with this solution, we almost got it but the vertical alignment is not correct.
Hi
Thanks for your request. The problem occurs because the way how Aspose.Words handles content inside Shape nodes was changed. In earlier versions Aspose.Words extracts content from the shape and insert at the place of the shape when you convert to HTML. Currently, Aspose.Words is supposed to render the Shape as an image. That is why you see such significant difference.
If you have a control over the document creation process, you can easily workaround the problem by avoiding using TextBox Shapes to layout content in your document.
Best regards,