Aspose word to html, add custom class name to header/footer

Hi team,

I am using Aspose Word for Java (19.3), trying to save word document into html using HtmlFixedSaveOptions and want to add/append some custom class name to header/footer in HTML string.

        Document doc = new Document(inputStream);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();

        HtmlFixedSaveOptions options = new HtmlFixedSaveOptions();
        options.setSaveFormat(SaveFormat.HTML_FIXED);
        options.setPageIndex(0);
        options.setPageMargins(5);
        options.setPageCount(doc.getPageCount());
        options.setExportEmbeddedImages(true);
        options.setNumeralFormat(NumeralFormat.SYSTEM);
        options.setExportEmbeddedCss(true);
        options.setUseHighQualityRendering(true);
        options.setPrettyFormat(false);
        options.setExportEmbeddedSvg(true);
        options.setExportEmbeddedFonts(true);
        
        doc.save(baos, options);

Is there any way to detect the header/footer in html string programmatically? can we do this with Aspose?

@saket.malpure

Please ZIP and attach your input Word document and expected output document here for our reference. We will then provide you more information about your query.

@tahir.manzoor have updated the question, take a look.

@saket.malpure

The HTML is not paginated. So, there is no header/footer like word document. However, you can get the header/footer of Word document using Aspose.Words and work with them.

Could you please elaborate your query more? We will then answer your query accordingly.