ODT to HTML — reading the container part by part
A pamphlet written in LibreOffice is being published as a page. Rather than describe the result in general terms, this page annotates one extraction: each part of the OpenDocument container, the element it becomes, or the reason it is refused. The output is sanitized reflowed markup, so the pamphlet's own page style never appears in the result.
Page layout, fonts, margins, headers, footers and page breaks are not reproduced: the text stream is reflowed, not re-laid-out.
Processed on your device. Files aren’t sent anywhere.
Part by part through the container
OpenDocument stores text together with a style name for each paragraph. The extraction reads the text stream and chooses an element from the style's role.
- Paragraph with a heading style → heading element. Annotation: the outline survives; the style name does not.
- Paragraph with a body style → paragraph element. Annotation: text and order are kept exactly.
- Numbered list item → list item. Annotation: the item travels; the counter format LibreOffice used does not.
- Table row and cell → table row and cell. Annotation: the grid survives as markup, but column widths do not.
- Text with direct emphasis → emphasis markup where the role is expressible. Annotation: font face and colour are not carried.
- Frame or image → nothing. Annotation: dropped, not copied, so captions arrive without their figures.
Style names versus elements
A document that uses custom styles — Preamble, Side note — carries no trace of those names into HTML. A style whose role has no HTML counterpart simply contributes its text at whatever position the story flow gives it.
That matters for margin notes. A side-comment style has no HTML counterpart, so such comments are not a reliable part of the extracted reading order. If the side comments are meaningful content, rewrite them into the body before publishing.
Questions before publishing
Does the HTML keep LibreOffice styles?
Are the photographs carried over?
Can the converted page run anything?
Are footnotes guaranteed?
What the sanitizer refuses to carry
Sanitizing is a decision made on output, not a limitation of the reader.
| Content in the ODT | Refused because | What you see instead |
|---|---|---|
| Scripts and macros | never executed, never carried | nothing at that position |
| Embedded styles | styling is not part of the output | plain elements styled by your site |
| Links judged unsafe | only safe destinations are kept | the link text without the destination |
| Images and frames | not copied into markup | caption text with no figure |
| Page style, margins, breaks | layout is not reproduced | one flowing column |
Reading order after reflow
Reflow changes how the document reads, even when nothing is missing.
- Two-column sections become one column, in document order.
- A footnote reference stays near its paragraph, and a carried note appears as linked content.
- A table that was sized to the page now takes the page width of your site.
- Page furniture — headers, footers, page numbers — is absent, so running references to page numbers point at nothing.
- One file up to 8 MiB is accepted and output is capped at 400000 characters; oversized input is rejected rather than partially converted.