4 ms·
Is parsing docx pretty robust these days or is it difficult to grab all of the styling components? There is a group of people where I work that write content ex
by SOLAR_FIELDS 8y ago
Is parsing docx pretty robust these days or is it difficult to grab all of the styling components? There is a group of people where I work that write content exclusively in docx and it’s difficult to convince them to change their workflow because of all the styling Word offers and familiarity with the tool. If there are super robust solutions that make it easy to basically turn docx into something parseable while conserving the styling aspects I haven’t found them yet.
- kapep 8y agoPandoc can convert docx into many formats. How robust it actually is probably depends a bit on how complex the styling and layout is done though.
- amiga-workbench 8y agoIts still not great, I've found no way to convert DocX into a sane intermediate format so I've ended up writing a few specialised parsers that can make fairly decent sense of a few small cases like tables of contents, tables and lists. My table parser still isn't perfect, its had a few documents thrown at it with merged cells that look just fine in Word, but don't have the colspan attributes I'm expecting. Its still significantly reducing the workload of our content guy, he just has to double check how its displaying. I've largely tried to avoid styling extraction but I did have a quick go, tables do contain properties for background colours and border tinting but the values don't seem to match what is being displayed within word. I think DocX has an equivalent of a stylesheet kicking around somewhere which may contain more accurate styling info but my work hasn't required that I look into it yet.