mammoth.js
mammoth.js copied to clipboard
Support header/footer
As per title
I've been researching docx converters recently. Many seem to have issues with headers and footers. Is it possible to explain why it's tough to implement this?
I don't know about other tools, but Mammoth doesn't convert headers and footers because it's not obvious what the correct behaviour when converting to HTML would be in the general case.
@mwilliamson I started to make some progress trying to put headers and footers at the ends and after every hard page break. I have only been playing around with mammoth for 1 day, so I could probably be doing a whole lot of things better. Your feedback would be greatly appreciated - https://github.com/shubhamgoyal/python-mammoth/commit/57e5d29e8979477cfb4e0c7c56ea044dd1e68380
I'm hoping to use Mammoth in a workflow preparing docx files for epub. For that, I have to access page information (page numbers etc) that's in the headers of the docx pages.
Even if header and footer information was default ignored by Mammoth, it would be fantastic if I could somehow inject their content via the style map.
Hi all, do we have any updates on this issue?
+1 for feature request, at least in raw text if not html.
As this functionality has already been added to the python version I ported that PR to this library in my PR https://github.com/mwilliamson/mammoth.js/pull/373. Not sure the reasoning behind flat out refusing to add the feature to this library, and I doubt my PR will ever be merged, but hopefully some find it useful.
+1 for this feature, totally necessary
I'm not sure when or if I'll get time to work on it, but having a minimal example document and the HTML you'd expect to see generated for each of your use cases would be useful.