Hi,
Is there any method in Aspose to get the header and footer as a html string?
for (int i = 0; i < section.getChildNodes().getCount(); i++)
{
Node node = section.getChildNodes().get(i);
// Every node has the NodeType property.
switch (node.getNodeType())
{
case NodeType.BODY:
{
// If the node type is Body, we can cast the node to the Body class.
Body body = (Body)node;
// Write the content of the main story of the section to the console.
System.out.println("*** Body ***");
System.out.println(body.getText());
break;
}
case NodeType.HEADER_FOOTER:
{
// If the node type is HeaderFooter, we can cast the node to the HeaderFooter class.
HeaderFooter headerFooter = (HeaderFooter)node;
// Write the content of the header footer to the console.
System.out.println("*** HeaderFooter ***");
System.out.println(headerFooter.getHeaderFooterType());
System.out.println(headerFooter.getText());
break;
}
I am using the above code for to get the header and footer node.
I can get only the text by headerFooter.getText().
why don’t you give the method like headerFooter.getHtml() or headerFooter.toHtml().
I need to get the header and footer as a html string either from the doc or from the converted html.
In the first case i can only get the header as a TEXT not as a HTML by aspose methods.
In the second case header and footer are not surrounded by any container and also there is no unique pattern for to identify the header and footer.
In openoffice case in the html they give the header and footer surrounded by DIV container and also give some unique pattern like
**. In that case i can easily identify the header and footer from the html and get the same from the html.
Is there any method to get the innerhtml of the given node?
Waiting for your reply,
Thanks,
chandrasekar.P**